Fix the regression introduced in #8580

master
Harshavardhana 5 years ago
parent 30e80d0a86
commit 2ff8132e2d
  1. 5
      cmd/admin-handlers-config-kv.go

@ -130,6 +130,11 @@ func (a adminAPIHandlers) SetConfigKVHandler(w http.ResponseWriter, r *http.Requ
return
}
if _, err = cfg.ReadFrom(bytes.NewReader(kvBytes)); err != nil {
writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
return
}
if err = validateConfig(cfg); err != nil {
writeCustomErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigBadJSON), err.Error(), r.URL)
return

Loading…
Cancel
Save