legacy events: also set Action="die"

Since #10168, on the event "died", the Status is set to "die"
for compatibility with the Docker API.  Docker also sets
the field Action to "died", so do the same here.

Signed-off-by: Leah Neukirchen <leah@vuxu.org>
This commit is contained in:
Leah Neukirchen 2021-12-17 15:21:56 +01:00
parent 820cf0e066
commit a1ebde118a
1 changed files with 1 additions and 0 deletions

View File

@ -91,6 +91,7 @@ func GetEvents(w http.ResponseWriter, r *http.Request) {
e := entities.ConvertToEntitiesEvent(*evt)
if !utils.IsLibpodRequest(r) && e.Status == "died" {
e.Status = "die"
e.Action = "die"
}
if err := coder.Encode(e); err != nil {