fix three swarm api response status code

Signed-off-by: Sun Hongliang <allen.sun@daocloud.io>
This commit is contained in:
Sun Hongliang 2016-03-09 01:01:55 +08:00
parent 1da3c25c06
commit 51a63c13c8
1 changed files with 2 additions and 0 deletions

View File

@ -587,6 +587,7 @@ func postNetworksCreate(c *context, w http.ResponseWriter, r *http.Request) {
} }
w.Header().Set("Content-Type", "application/json") w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusCreated)
json.NewEncoder(w).Encode(response) json.NewEncoder(w).Encode(response)
} }
@ -606,6 +607,7 @@ func postVolumesCreate(c *context, w http.ResponseWriter, r *http.Request) {
} }
w.Header().Set("Content-Type", "application/json") w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusCreated)
json.NewEncoder(w).Encode(volume) json.NewEncoder(w).Encode(volume)
} }