diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-02-11 05:38:35 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-11 05:38:35 -0500 |
commit | afe4ce6b1ce6a5ba21472f51defd243bdd7750b3 (patch) | |
tree | 3ed22e8ec7e295ce95523762bf2b76eabada70c1 /pkg | |
parent | ca354f13f28896351e910da72f946e21bac2c6b0 (diff) | |
parent | f28b08fe969b90f6823ec3001cc7472738a1bffc (diff) | |
download | podman-afe4ce6b1ce6a5ba21472f51defd243bdd7750b3.tar.gz podman-afe4ce6b1ce6a5ba21472f51defd243bdd7750b3.tar.bz2 podman-afe4ce6b1ce6a5ba21472f51defd243bdd7750b3.zip |
Merge pull request #9312 from baude/issue9310
Correct compat network prune response
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/api/handlers/compat/networks.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/networks.go b/pkg/api/handlers/compat/networks.go index 85d2db87e..83c80aac9 100644 --- a/pkg/api/handlers/compat/networks.go +++ b/pkg/api/handlers/compat/networks.go @@ -400,6 +400,9 @@ func Prune(w http.ResponseWriter, r *http.Request) { utils.Error(w, "Something went wrong.", http.StatusInternalServerError, err) return } + type response struct { + NetworksDeleted []string + } var prunedNetworks []string //nolint for _, pr := range pruneReports { if pr.Error != nil { @@ -408,5 +411,5 @@ func Prune(w http.ResponseWriter, r *http.Request) { } prunedNetworks = append(prunedNetworks, pr.Name) } - utils.WriteResponse(w, http.StatusOK, prunedNetworks) + utils.WriteResponse(w, http.StatusOK, response{NetworksDeleted: prunedNetworks}) } |