feat: update template
This commit is contained in:
@@ -100,7 +100,7 @@ func (h *RoleHandler) ListAll(w http.ResponseWriter, r *http.Request) {
|
||||
func (h *RoleHandler) Create(w http.ResponseWriter, r *http.Request) {
|
||||
var req request.CreateRoleRequest
|
||||
|
||||
if err := httputil.BindJson(r, &req); err != nil {
|
||||
if err := httputil.BindJson(w, r, &req); err != nil {
|
||||
httputil.Fail(w, err)
|
||||
return
|
||||
}
|
||||
@@ -122,7 +122,7 @@ func (h *RoleHandler) 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
|
||||
}
|
||||
@@ -144,7 +144,7 @@ func (h *RoleHandler) SetRoleMenus(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
|
||||
}
|
||||
@@ -166,7 +166,7 @@ func (h *RoleHandler) SetRoleApis(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