summaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authormaybe-sybr <58414429+maybe-sybr@users.noreply.github.com>2020-06-24 15:06:06 +1000
committerMatthew Heon <mheon@redhat.com>2020-06-24 14:44:55 -0400
commit01bc6bdda87b00f8050cd94a2ad807159ba0da8a (patch)
treec20fb1ddc8d9a6845b97fa5e960b3b1cb8d75532 /pkg/api
parent1cc603c1f3f2ec4b2de74dc8747263d0d42c43c0 (diff)
downloadpodman-01bc6bdda87b00f8050cd94a2ad807159ba0da8a.tar.gz
podman-01bc6bdda87b00f8050cd94a2ad807159ba0da8a.tar.bz2
podman-01bc6bdda87b00f8050cd94a2ad807159ba0da8a.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/api')
-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) {