fix query param struct filling

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2023-05-29 12:26:56 +03:00
parent ca6cea861f
commit 10ae1741fc
1 changed files with 6 additions and 4 deletions

View File

@ -487,10 +487,12 @@ func (h *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
} }
} }
matches = rflutil.FlattenMap(matches) if len(matches) > 0 {
if err = rflutil.Merge(argv.Interface(), matches, rflutil.SliceAppend(true), rflutil.Tags([]string{"protobuf", "json"})); err != nil { matches = rflutil.FlattenMap(matches)
h.errorHandler(ctx, handler, w, r, err, http.StatusBadRequest) if err = rflutil.Merge(argv.Interface(), matches, rflutil.SliceAppend(true), rflutil.Tags([]string{"protobuf", "json"})); err != nil {
return h.errorHandler(ctx, handler, w, r, err, http.StatusBadRequest)
return
}
} }
hr := &rpcRequest{ hr := &rpcRequest{