Containers prune endpoint should use only prune filters

Containers endpoints for HTTP compad and libpod APIs allowed usage of list HTTP
endpoint filter funcs. Documentation in case of libpod and compat API does not allow that.
This commit aligns code with the documentation.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
This commit is contained in:
Jakub Guzik
2021-03-30 10:19:22 +02:00
parent 08eab3f8f7
commit f7d82a1f30
5 changed files with 57 additions and 17 deletions

View File

@ -23,7 +23,7 @@ func PruneContainers(w http.ResponseWriter, r *http.Request) {
filterFuncs := make([]libpod.ContainerFilter, 0, len(*filtersMap))
for k, v := range *filtersMap {
generatedFunc, err := filters.GenerateContainerFilterFuncs(k, v, runtime)
generatedFunc, err := filters.GeneratePruneContainerFilterFuncs(k, v, runtime)
if err != nil {
utils.InternalServerError(w, err)
return