mirror of https://github.com/docker/docs.git
fix three swarm api response status code
Signed-off-by: Sun Hongliang <allen.sun@daocloud.io>
This commit is contained in:
parent
1da3c25c06
commit
51a63c13c8
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue