summaryrefslogtreecommitdiff
path: root/pkg/api/handlers
diff options
context:
space:
mode:
authorMatej Vasek <mvasek@redhat.com>2021-02-01 21:23:44 +0100
committerMatej Vasek <mvasek@redhat.com>2021-02-03 21:49:09 +0100
commitfc385806dfe1d13a7d4e4bdaeea93a22a55bd3d4 (patch)
tree1551262302d3cf31740cfd3474d150e1c2b21422 /pkg/api/handlers
parent570e1587dde267adea7fe460086dffee6aec83a4 (diff)
downloadpodman-fc385806dfe1d13a7d4e4bdaeea93a22a55bd3d4.tar.gz
podman-fc385806dfe1d13a7d4e4bdaeea93a22a55bd3d4.tar.bz2
podman-fc385806dfe1d13a7d4e4bdaeea93a22a55bd3d4.zip
Improve ContainerEngine.ContainerWait()
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Diffstat (limited to 'pkg/api/handlers')
-rw-r--r--pkg/api/handlers/utils/containers.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/api/handlers/utils/containers.go b/pkg/api/handlers/utils/containers.go
index fac237f87..7443f9b46 100644
--- a/pkg/api/handlers/utils/containers.go
+++ b/pkg/api/handlers/utils/containers.go
@@ -23,8 +23,8 @@ func WaitContainer(w http.ResponseWriter, r *http.Request) (int32, error) {
containerEngine := abi.ContainerEngine{Libpod: runtime}
decoder := r.Context().Value("decoder").(*schema.Decoder)
query := struct {
- Interval string `schema:"interval"`
- Condition define.ContainerStatus `schema:"condition"`
+ Interval string `schema:"interval"`
+ Condition []define.ContainerStatus `schema:"condition"`
}{
// Override golang default values for types
}
@@ -33,7 +33,7 @@ func WaitContainer(w http.ResponseWriter, r *http.Request) (int32, error) {
return 0, err
}
options := entities.WaitOptions{
- Condition: define.ContainerStateStopped,
+ Condition: []define.ContainerStatus{define.ContainerStateStopped},
}
name := GetName(r)
if _, found := r.URL.Query()["interval"]; found {