From d51d4190862fdc14b313f5578b5ed465905bdb7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Sun, 29 Dec 2024 03:13:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=AA=8C=E8=AF=81=E5=99=A8=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/http/request/container_image.go | 4 ++-- internal/http/request/cron.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/http/request/container_image.go b/internal/http/request/container_image.go index f3c4aae8..4bebd9ce 100644 --- a/internal/http/request/container_image.go +++ b/internal/http/request/container_image.go @@ -7,6 +7,6 @@ type ContainerImageID struct { type ContainerImagePull struct { Name string `form:"name" json:"name" validate:"required"` Auth bool `form:"auth" json:"auth"` - Username string `form:"username" json:"username" validate:"requiredIf=Auth,true"` - Password string `form:"password" json:"password" validate:"requiredIf=Auth,true"` + Username string `form:"username" json:"username" validate:"requiredIf:Auth,true"` + Password string `form:"password" json:"password" validate:"requiredIf:Auth,true"` } diff --git a/internal/http/request/cron.go b/internal/http/request/cron.go index 454052e3..c55f5569 100644 --- a/internal/http/request/cron.go +++ b/internal/http/request/cron.go @@ -5,7 +5,7 @@ type CronCreate struct { Type string `form:"type" json:"type" validate:"required"` Time string `form:"time" json:"time" validate:"required|cron"` Script string `form:"script" json:"script"` - BackupType string `form:"backup_type" json:"backup_type" validate:"requiredIf=Type,backup"` + BackupType string `form:"backup_type" json:"backup_type" validate:"requiredIf:Type,backup"` BackupPath string `form:"backup_path" json:"backup_path"` Target string `form:"target" json:"target" validate:"required"` Save int `form:"save" json:"save" validate:"required"`