fix swagger handler #173

Merged
vtolstov merged 1 commits from handler-swagger into master 2023-08-14 13:45:14 +03:00
Showing only changes of commit 13cdeb9397 - Show all commits

View File

@ -29,6 +29,12 @@ var Handler = func(dst map[string]interface{}, fsys fs.FS) http.HandlerFunc {
return return
} }
if dst == nil {
w.WriteHeader(http.StatusOK)
_, _ = w.Write(buf)
return
}
var src interface{} var src interface{}
if err = c.Unmarshal(buf, src); err != nil { if err = c.Unmarshal(buf, src); err != nil {