From e95e79b572a7e139de37aa9c3a3faad1da0f0d36 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Thu, 4 May 2023 17:44:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=99=90=E5=88=B6=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E9=95=BF=E5=BA=A6=20(#866)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/dto/common_req.go | 2 +- backend/app/dto/setting.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/app/dto/common_req.go b/backend/app/dto/common_req.go index 5742289f7..5b6a0b532 100644 --- a/backend/app/dto/common_req.go +++ b/backend/app/dto/common_req.go @@ -12,7 +12,7 @@ type PageInfo struct { type UpdateDescription struct { ID uint `json:"id" validate:"required"` - Description string `json:"description"` + Description string `json:"description" validate:"max=256"` } type OperationWithName struct { diff --git a/backend/app/dto/setting.go b/backend/app/dto/setting.go index 613b3d48c..9a3aee038 100644 --- a/backend/app/dto/setting.go +++ b/backend/app/dto/setting.go @@ -69,7 +69,7 @@ type PortUpdate struct { type SnapshotCreate struct { From string `json:"from" validate:"required,oneof=OSS S3 SFTP MINIO COS KODO"` - Description string `json:"description"` + Description string `json:"description" validate:"max=256"` } type SnapshotRecover struct { IsNew bool `json:"isNew"` @@ -79,12 +79,12 @@ type SnapshotRecover struct { type SnapshotImport struct { From string `json:"from"` Names []string `json:"names"` - Description string `json:"description"` + Description string `json:"description" validate:"max=256"` } type SnapshotInfo struct { ID uint `json:"id"` Name string `json:"name"` - Description string `json:"description"` + Description string `json:"description" validate:"max=256"` From string `json:"from"` Status string `json:"status"` Message string `json:"message"`