summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authormaybe-sybr <58414429+maybe-sybr@users.noreply.github.com>2020-06-24 15:06:06 +1000
committermaybe-sybr <58414429+maybe-sybr@users.noreply.github.com>2020-06-24 15:08:20 +1000
commit3430ca4df00981d0e0674f6b413c7a22af19ba94 (patch)
tree0851013d4f34c2464a8d2e8f57a47337e19bc9ee /pkg
parent5fe122bf528a0665f7d12bc47357779b8686f6cf (diff)
downloadpodman-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>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/libpod/volumes.go2
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) {