From 5f2cfe6e207f9973ecc26cd476ce157c7f676839 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Wed, 10 Jul 2024 12:09:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=BF=AB=E7=85=A7?= =?UTF-8?q?=E6=81=A2=E5=A4=8D=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#5739)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/dto/container.go | 2 +- backend/app/service/snapshot_recover.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/dto/container.go b/backend/app/dto/container.go index 0ead8b5a5..90a351768 100644 --- a/backend/app/dto/container.go +++ b/backend/app/dto/container.go @@ -8,7 +8,7 @@ type PageContainer struct { PageInfo Name string `json:"name"` State string `json:"state" validate:"required,oneof=all created running paused restarting removing exited dead"` - OrderBy string `json:"orderBy" validate:"required,oneof=name status created_at"` + OrderBy string `json:"orderBy" validate:"required,oneof=name state created_at"` Order string `json:"order" validate:"required,oneof=null ascending descending"` Filters string `json:"filters"` ExcludeAppStore bool `json:"excludeAppStore"` diff --git a/backend/app/service/snapshot_recover.go b/backend/app/service/snapshot_recover.go index bfb2320e2..d559c0843 100644 --- a/backend/app/service/snapshot_recover.go +++ b/backend/app/service/snapshot_recover.go @@ -74,7 +74,7 @@ func (u *SnapshotService) HandleSnapshotRecover(snap model.Snapshot, isRecover b req.IsNew = true } if isRecover && (req.IsNew || snap.InterruptStep == "AppData") { - if err := recoverAppData(snapFileDir); err == nil { + if err := recoverAppData(snapFileDir); err != nil { updateRecoverStatus(snap.ID, isRecover, "DockerDir", constant.StatusFailed, fmt.Sprintf("handle recover app data failed, err: %v", err)) return }