fix(user): fail to change password #852

This commit is contained in:
Jacky 2025-02-06 21:01:36 +08:00
parent 7049599922
commit 8e523258b5
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D

View file

@ -10,7 +10,7 @@ type User struct {
Model
Name string `json:"name" cosy:"add:max=20;update:omitempty,max=20;list:fussy;db_unique"`
Password string `json:"-" cosy:"add:required,max=20;update:omitempty,max=20"`
Password string `json:"-" cosy:"json:password;add:required,max=20;update:omitempty,max=20"`
Status bool `json:"status" gorm:"default:1"`
OTPSecret []byte `json:"-" gorm:"type:blob"`
EnabledTwoFA bool `json:"enabled_2fa" gorm:"-"`