feat: update template

This commit is contained in:
2026-08-19 22:05:49 +08:00
parent 0e674e9d56
commit 5a71093b0c
67 changed files with 2070 additions and 585 deletions

View File

@@ -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
}