mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
skip if http.StatusNoContent
This commit is contained in:
parent
ec989b0377
commit
0b2a92d371
|
@ -34,6 +34,10 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func writeJson(w http.ResponseWriter, r *http.Request, httpStatus int, obj interface{}) (err error) {
|
func writeJson(w http.ResponseWriter, r *http.Request, httpStatus int, obj interface{}) (err error) {
|
||||||
|
if httpStatus == http.StatusNoContent {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
var bytes []byte
|
var bytes []byte
|
||||||
if obj != nil {
|
if obj != nil {
|
||||||
if r.FormValue("pretty") != "" {
|
if r.FormValue("pretty") != "" {
|
||||||
|
|
Loading…
Reference in a new issue