skip if http.StatusNoContent

This commit is contained in:
Chris Lu 2021-08-15 11:27:49 -07:00
parent ec989b0377
commit 0b2a92d371

View file

@ -34,6 +34,10 @@ func init() {
}
func writeJson(w http.ResponseWriter, r *http.Request, httpStatus int, obj interface{}) (err error) {
if httpStatus == http.StatusNoContent {
return
}
var bytes []byte
if obj != nil {
if r.FormValue("pretty") != "" {