Skip to content

Commit

Permalink
fix: 验证器错误
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Dec 28, 2024
1 parent 70d9e5e commit d51d419
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/http/request/container_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
2 changes: 1 addition & 1 deletion internal/http/request/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit d51d419

Please sign in to comment.