From 8e523258b51fd24da0b8b82e84519c355ce84c4c Mon Sep 17 00:00:00 2001 From: Jacky Date: Thu, 6 Feb 2025 21:01:36 +0800 Subject: [PATCH] fix(user): fail to change password #852 --- model/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/user.go b/model/user.go index 213a502c..bb4cdf20 100644 --- a/model/user.go +++ b/model/user.go @@ -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:"-"`