mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-23 17:20:24 +08:00
remote handler blank line when .HasRequest is false (#986)
This commit is contained in:
parent
4ef1859f0b
commit
c26c187e11
@ -28,9 +28,9 @@ func {{.HandlerName}}(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
httpx.Error(w, err)
|
||||
return
|
||||
}{{end}}
|
||||
}
|
||||
|
||||
l := logic.New{{.LogicType}}(r.Context(), ctx)
|
||||
{{end}}l := logic.New{{.LogicType}}(r.Context(), ctx)
|
||||
{{if .HasResp}}resp, {{end}}err := l.{{.Call}}({{if .HasRequest}}req{{end}})
|
||||
if err != nil {
|
||||
httpx.Error(w, err)
|
||||
|
Loading…
Reference in New Issue
Block a user