fix: cast to user, no pointer

This commit is contained in:
Derrick Hammer 2024-03-19 09:38:05 -04:00
parent 3b3faaa1e6
commit 1d60cbf532
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ type User struct {
}
func (u *User) BeforeUpdate(tx *gorm.DB) error {
dest := tx.Statement.Dest.(*User)
dest := tx.Statement.Dest.(User)
if tx.Statement.Changed("Email") {
verify, err := getEmailVerfier().Verify(dest.Email)