summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-11-10 17:49:41 -0500
committerTucker Evans <tuckerevans24@gmail.com>2019-11-10 17:52:29 -0500
commitb84c2d1ec6acb70f76a03010b1fdc868cf3d485e (patch)
tree320a0cd3d46212fde0b89ed040fb66ddb25c29eb /backend
parent77e855276e3672875d1d0612fe8a72be1b49b642 (diff)
Add Todos
Diffstat (limited to 'backend')
-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