chore: 调整api的handler,修复parse多参数的问题。

main v1.5.17
NoahLan 1 year ago
parent aba2fc3b8e
commit 714e631ab7

@ -15,7 +15,7 @@ func {{.HandlerName}}(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) { return func(w http.ResponseWriter, r *http.Request) {
{{if .TransErr}}const transErr = true{{else}}const transErr = false{{end}} {{if .TransErr}}const transErr = true{{else}}const transErr = false{{end}}
{{if .HasRequest}}var req types.{{.RequestType}} {{if .HasRequest}}var req types.{{.RequestType}}
if err := httpx.Parse(r, &req, true); err != nil { if err := httpx.Parse(r, &req); err != nil {
statusz.ResponseHandler(r, w, transErr, nil, err) statusz.ResponseHandler(r, w, transErr, nil, err)
return return
} }

Loading…
Cancel
Save