Revert "忘记密码以后,重设二步验证设定"

This reverts commit c5ac10b11c.
This commit is contained in:
KusakabeSi 2021-03-01 12:58:08 +08:00
parent c5ac10b11c
commit 0c435650d8

View file

@ -62,10 +62,7 @@ func (service *UserResetService) Reset(c *gin.Context) serializer.Response {
if err := user.Update(map[string]interface{}{"password": user.Password}); err != nil {
return serializer.DBErr("无法重设密码", err)
}
// 重设二步验证设定
if err := user.Update(map[string]interface{}{"two_factor": ""}); err != nil {
return serializer.DBErr("无法更新二步验证设定", err)
}
cache.Deletes([]string{fmt.Sprintf("%d", uid)}, "user_reset_")
return serializer.Response{}
}