mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Fix network prune api docs
The api doc used wrong response examples for both the compat and libpod network prune endpoints. Change the doc so that it matches the actual return values. Also fix the endpoints to return an empty array instead of null when no networks are removed. [NO TESTS NEEDED] Fixes: #10564 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -190,5 +190,8 @@ func Prune(w http.ResponseWriter, r *http.Request) {
|
||||
utils.Error(w, "Something went wrong.", http.StatusInternalServerError, err)
|
||||
return
|
||||
}
|
||||
if pruneReports == nil {
|
||||
pruneReports = []*entities.NetworkPruneReport{}
|
||||
}
|
||||
utils.WriteResponse(w, http.StatusOK, pruneReports)
|
||||
}
|
||||
|
Reference in New Issue
Block a user