From 0c435650d8ca8c498829f790822590792abb8434 Mon Sep 17 00:00:00 2001 From: KusakabeSi Date: Mon, 1 Mar 2021 12:58:08 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E5=BF=98=E8=AE=B0=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E4=BB=A5=E5=90=8E=EF=BC=8C=E9=87=8D=E8=AE=BE=E4=BA=8C=E6=AD=A5?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E8=AE=BE=E5=AE=9A"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit c5ac10b11c960c0a3213f3daba24a8170dc71f6a. --- service/user/login.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/service/user/login.go b/service/user/login.go index 68fbe2b..acea163 100644 --- a/service/user/login.go +++ b/service/user/login.go @@ -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{} }