diff options
author | maybe-sybr <58414429+maybe-sybr@users.noreply.github.com> | 2020-06-24 15:06:06 +1000 |
---|---|---|
committer | maybe-sybr <58414429+maybe-sybr@users.noreply.github.com> | 2020-06-24 15:08:20 +1000 |
commit | 3430ca4df00981d0e0674f6b413c7a22af19ba94 (patch) | |
tree | 0851013d4f34c2464a8d2e8f57a47337e19bc9ee | |
parent | 5fe122bf528a0665f7d12bc47357779b8686f6cf (diff) | |
download | podman-3430ca4df00981d0e0674f6b413c7a22af19ba94.tar.gz podman-3430ca4df00981d0e0674f6b413c7a22af19ba94.tar.bz2 podman-3430ca4df00981d0e0674f6b413c7a22af19ba94.zip |
APIv2: Return `StatusCreated` from volume creation
The swagdoc in `register_volumes.go` already correctly notes that a 201
should be returned upon success, so we only need to change the handler
to match the spec.
Signed-off-by: Matt Brindley <58414429+maybe-sybr@users.noreply.github.com>
-rw-r--r-- | pkg/api/handlers/libpod/volumes.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/api/handlers/libpod/volumes.go b/pkg/api/handlers/libpod/volumes.go index ea035fc4d..4b3b5430b 100644 --- a/pkg/api/handlers/libpod/volumes.go +++ b/pkg/api/handlers/libpod/volumes.go @@ -73,7 +73,7 @@ func CreateVolume(w http.ResponseWriter, r *http.Request) { UID: config.UID, GID: config.GID, } - utils.WriteResponse(w, http.StatusOK, volResponse) + utils.WriteResponse(w, http.StatusCreated, volResponse) } func InspectVolume(w http.ResponseWriter, r *http.Request) { |