added info to meal
This commit is contained in:
14
main.go
14
main.go
@@ -94,6 +94,20 @@ func main() {
|
||||
} else {
|
||||
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
|
||||
}
|
||||
} else if strings.Contains(path, "/edit") {
|
||||
// Meal edit route
|
||||
if r.Method == "GET" {
|
||||
handlers.GetEditMealHandler(w, r)
|
||||
} else {
|
||||
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
|
||||
}
|
||||
} else if strings.Contains(path, "/update") {
|
||||
// Meal update route
|
||||
if r.Method == "POST" {
|
||||
handlers.UpdateMealHandler(w, r)
|
||||
} else {
|
||||
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
|
||||
}
|
||||
} else {
|
||||
// Meal delete route
|
||||
if r.Method == "DELETE" {
|
||||
|
||||
Reference in New Issue
Block a user