fix🐛: 添加bcrypt包的引用

This commit is contained in:
zhangwenjian committed 2022-07-27 21:49:24 +08:00
1 parent 70bd8b26ad
commit f469536174
2 files changed
+6 -3

No files matched your search

+3 -1
View File
@@ -233,7 +233,9 @@ func (e *SysUser) UpdatePwd(id int, oldPassword, newPassword string, p *actions.
return err
}
c.Password = newPassword
db := e.Orm.Model(c).Where("user_id = ?", id).Select("Password", "Salt").Updates(c)
db := e.Orm.Model(c).Where("user_id = ?", id).
Select("Password", "Salt").
Updates(c)
if err = db.Error; err != nil {
e.Log.Errorf("db error: %s", err)
return err