summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/main.go5
-rw-r--r--backend/todo.txt2
2 files changed, 6 insertions, 1 deletions
diff --git a/backend/main.go b/backend/main.go
index fc7317f..b4cd76f 100644
--- a/backend/main.go
+++ b/backend/main.go
@@ -121,7 +121,7 @@ func RecipeList(w http.ResponseWriter, r *http.Request) {
}
}
-
+ //TODO add generic error response
}
func SingleRecipe(w http.ResponseWriter, r *http.Request) {
@@ -160,7 +160,9 @@ func SingleRecipe(w http.ResponseWriter, r *http.Request) {
} else if r.Method == "POST" {
fmt.Printf("Create recipe \"%d\"...\n", recipe_id)
+ //TODO add error msg response
} else if r.Method == "PUT" {
+ //TODO add Update Recipe
fmt.Printf("Update recipe \"%d\"...\n", recipe_id)
} else if r.Method == "DELETE" {
res, err := db.Exec(`DELETE FROM recipes where id = $1`,
@@ -192,6 +194,7 @@ func SingleRecipe(w http.ResponseWriter, r *http.Request) {
}
}
+ //TODO add generic error response
}
var DB_PASSWORD string
diff --git a/backend/todo.txt b/backend/todo.txt
new file mode 100644
index 0000000..3c911c4
--- /dev/null
+++ b/backend/todo.txt
@@ -0,0 +1,2 @@
+Add Update method for recipes
+Add Error responses for incorrect methods