feat: update template
This commit is contained in:
@@ -63,7 +63,7 @@ func (h *MenuHandler) ListAll(w http.ResponseWriter, r *http.Request) {
|
||||
func (h *MenuHandler) Create(w http.ResponseWriter, r *http.Request) {
|
||||
var req request.CreateMenuRequest
|
||||
|
||||
if err := httputil.BindJson(r, &req); err != nil {
|
||||
if err := httputil.BindJson(w, r, &req); err != nil {
|
||||
httputil.Fail(w, err)
|
||||
return
|
||||
}
|
||||
@@ -85,7 +85,7 @@ func (h *MenuHandler) Update(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if err = httputil.BindJson(r, &req); err != nil {
|
||||
if err = httputil.BindJson(w, r, &req); err != nil {
|
||||
httputil.Fail(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user