mirror of https://github.com/docker/docs.git
Merge pull request #1933 from allencloud/compatile-api-response-status-code
fix two swarm apis' response status code
This commit is contained in:
commit
e0b5e6f5fa
|
@ -590,6 +590,7 @@ func postNetworksCreate(c *context, w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
json.NewEncoder(w).Encode(response)
|
||||
}
|
||||
|
||||
|
@ -609,6 +610,7 @@ func postVolumesCreate(c *context, w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
json.NewEncoder(w).Encode(volume)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue