Browse Source

修改更新密码

lijian 6 years ago
parent
commit
247b91d278
1 changed files with 1 additions and 5 deletions
  1. 1 5
      services/knowoapi/controllers/user.go

+ 1 - 5
services/knowoapi/controllers/user.go

@@ -97,15 +97,11 @@ func (a *UserController) PutChange() {
 		badRequest(a.Ctx, err)
 		return
 	}
-	b, err := a.Service.ModifyPassword(a.Token.getRecorID(a.Ctx), req.OldPass, req.NewPass)
+	_, err := a.Service.ModifyPassword(a.Token.getRecorID(a.Ctx), req.OldPass, req.NewPass)
 	if err != nil {
 		server.Log.Error(err)
 		responseError(a.Ctx, ErrDatabase, err.Error())
 		return
 	}
-	if !b {
-		responseError(a.Ctx, ErrNormal, "原密码不正确")
-		return
-	}
 	done(a.Ctx, "修改成功")
 }