summaryrefslogtreecommitdiff
path: root/backend/recipe.go
AgeCommit message (Collapse)Author
2019-12-09Fix ingredient unit type to be same across frontend & backendTucker Evans
2019-12-02Fix remove Num from Step structTucker Evans
The index of the array can be used instead.
2019-12-02Fix changes json encoding to match frontendTucker Evans
2019-11-12Add update functionality to APITucker Evans
2019-11-12Add transactions to Insert sql statementTucker Evans
Transactions allow us to rollback inserts ensuring that the database is in sync with our application.
2019-11-12Add id to ingredients so we can delete unused on updateTucker Evans
When updating ingredients if some # are remove we need to remove the same number from the database and update the rest, without an id column we don't know which ones to delete.
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 create recipe functionalityTucker Evans
2019-11-10Fix RecipeFromId expects only one row from databaseTucker Evans
Now uses sql.QueryRow rather than sql.Query so it doesnt have to check row.Next(), just have to check that row was returned (on scan call)
2019-11-10Fix MakeRecipeFromIdTucker Evans
MakeRecipeFromId was creating a empty recipe because rows.Next() was not being checked.
2019-11-09Add make Recipe w/ id & database connectionTucker Evans
2019-11-09Add Recipe Type (w/ subtypes Ingredients & Steps)Tucker Evans