fix(passport): 修复初始化数据错误密码也可以登录问题

This commit is contained in:
zhengxinonly
2023-12-22 22:46:54 +08:00
parent 2f4f1faf82
commit 7203bcfecc
3 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ def login_in():
if not user:
return {"message": "用户不存在", "code": -1}, 401
if user.check_password(data["password"]):
if not user.check_password(data["password"]):
return {"message": "用户密码错误", "code": -1}, 401
access_token = create_access_token(user)