aboutsummaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorMatej Vasek <mvasek@redhat.com>2021-02-01 21:23:44 +0100
committerMatthew Heon <matthew.heon@pm.me>2021-02-08 14:29:18 -0500
commitd6625f2948f182bfe01ec81d95f9865973f3ad3b (patch)
treef12ab3bfc38917a916eed43a71722f7892a9fff6 /pkg/api
parent74db6e7ed3555deb13675b8f43465e200d8a8d85 (diff)
downloadpodman-d6625f2948f182bfe01ec81d95f9865973f3ad3b.tar.gz
podman-d6625f2948f182bfe01ec81d95f9865973f3ad3b.tar.bz2
podman-d6625f2948f182bfe01ec81d95f9865973f3ad3b.zip
Improve ContainerEngine.ContainerWait()
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Diffstat (limited to 'pkg/api')
-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 {