summaryrefslogtreecommitdiff
path: root/backend/main.go
AgeCommit message (Collapse)Author
2019-11-28Fix error handling on database connectTucker Evans
Now panics when can't connect to database and splits handling of errors from Open() and Ping() as separate issues.
2019-11-28Fix default case for http method checkTucker Evans
Moves default case (Method Not Allowed) into else clause so it is not necessary to return from the previous if's --- only for checking http method, error checking if statements can/should be returning where needed.
2019-11-27Add CORS headers to backend responsesbackend-v2.0Tucker Evans
Access-Control-Allow-Origin:* header added to API responses to allow angular to access API. Note: This allows all domains to access this API through browser javascript See <https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS> for a description of CORS
2019-11-27Add consntructor for APIResponseTucker Evans
2019-11-14Fix simplify APIResponse struct using interface{}Tucker Evans
Combines APIResponseItem and APIResponseList into one struct. Hopefully this allows for the combination of some response code (a function that sends a APIResponse that can be used by each http method)
2019-11-12Add error responses for generic http methodsbackend-v1.0Tucker Evans
Also adds error for POST to individual resource
2019-11-12Add update functionality to APITucker Evans
2019-11-12Fix change QueryRow to Exec for ingredient/step insertsTucker Evans
Changed database schema so ingredients & steps does not have an id, and therefore can't return it so instead we just exec the insert statement without returning anything. We do have to check that there were affected rows in order to accurately update the recipe object.
2019-11-10Add TodosTucker Evans
2019-11-10Add delete functionality for recipesTucker Evans
2019-11-10Add create recipe functionalityTucker Evans
2019-11-10Add correct errors for an nonexistent recipe idTucker Evans
2019-11-10Fix responses sent to clientTucker Evans
JSON is no longer output to stdout and actually sent to client
2019-11-10Add structure to JSON responsesTucker Evans
JSON responses contains a status(error) section and a data section Note: JSON is still not sent to client
2019-11-10Add basic functionality to get list of recipe idsTucker Evans
Note: Still only prints to stdout, does not respond to client
2019-11-09Add basic access recipe functionalityTucker Evans
Note: Only prints recipe to server stdout does not return to client
2019-11-09Fix database nameTucker Evans
2019-11-09Add database connectionTucker Evans
2019-11-08Add basic http routingTucker Evans