diff options
-rw-r--r-- | backend/main.go | 8 | ||||
-rw-r--r-- | backend/todo.txt | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/backend/main.go b/backend/main.go index 96bb824..4766de2 100644 --- a/backend/main.go +++ b/backend/main.go @@ -20,6 +20,14 @@ type APIResponse struct { Data interface{} } +func MakeAPIResponse(status int, msg string, data interface{}) *APIResponse { + return &APIResponse{ + Status: APIStatus{ + Code: status, + Msg: msg, + }, + Data: data, + } } func RecipeList(w http.ResponseWriter, r *http.Request) { diff --git a/backend/todo.txt b/backend/todo.txt index b2d928b..ae57ec0 100644 --- a/backend/todo.txt +++ b/backend/todo.txt @@ -1,2 +1,3 @@ Refactor Response creation Handle PSV parsing (rm empty string at end, or rm last pipe when creating item) +Fix Update (steps != 0) |