summaryrefslogtreecommitdiff
path: root/pkg/api/handlers
diff options
context:
space:
mode:
authorJakub Guzik <jakubmguzik@gmail.com>2021-04-07 00:02:12 +0200
committerMatthew Heon <mheon@redhat.com>2021-04-16 11:55:51 -0400
commit3338901c4fe0c185a3980b799d2f687d0731b327 (patch)
tree50c6e5c4b465a054e9a577624b1a9f173dde908a /pkg/api/handlers
parent850ead493282340920073f09053bd3bf6bf348ed (diff)
downloadpodman-3338901c4fe0c185a3980b799d2f687d0731b327.tar.gz
podman-3338901c4fe0c185a3980b799d2f687d0731b327.tar.bz2
podman-3338901c4fe0c185a3980b799d2f687d0731b327.zip
Volumes prune endpoint should use only prune filters
Volumes endpoints for HTTP compat and libpod APIs allowed usage of list HTTP endpoint filter funcs. Documentation in case of compat API does not allow that. This commit aligns code with the documentation and also ligns libpod with compat API. Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
Diffstat (limited to 'pkg/api/handlers')
-rw-r--r--pkg/api/handlers/compat/volumes.go2
-rw-r--r--pkg/api/handlers/libpod/volumes.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/api/handlers/compat/volumes.go b/pkg/api/handlers/compat/volumes.go
index 42ece643b..d86fc1e19 100644
--- a/pkg/api/handlers/compat/volumes.go
+++ b/pkg/api/handlers/compat/volumes.go
@@ -266,7 +266,7 @@ func PruneVolumes(w http.ResponseWriter, r *http.Request) {
}
f := (url.Values)(*filterMap)
- filterFuncs, err := filters.GenerateVolumeFilters(f)
+ filterFuncs, err := filters.GeneratePruneVolumeFilters(f)
if err != nil {
utils.Error(w, "Something when wrong.", http.StatusInternalServerError, errors.Wrapf(err, "failed to parse filters for %s", f.Encode()))
return
diff --git a/pkg/api/handlers/libpod/volumes.go b/pkg/api/handlers/libpod/volumes.go
index 442b53d1e..68aec30d5 100644
--- a/pkg/api/handlers/libpod/volumes.go
+++ b/pkg/api/handlers/libpod/volumes.go
@@ -150,7 +150,7 @@ func pruneVolumesHelper(r *http.Request) ([]*reports.PruneReport, error) {
}
f := (url.Values)(*filterMap)
- filterFuncs, err := filters.GenerateVolumeFilters(f)
+ filterFuncs, err := filters.GeneratePruneVolumeFilters(f)
if err != nil {
return nil, err
}