Skip to content

Commit

Permalink
Merge pull request #1762 from st1020/feat/add-login-lock-status
Browse files Browse the repository at this point in the history
feat: add login lock status
  • Loading branch information
Bidaya0 authored Aug 24, 2023
2 parents bee92de + b7b4086 commit 87b17d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dongtai_web/views/user_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def post(self, request: Request):
or (user.failed_login_count == 9 and delta < timedelta(minutes=60))
or user.failed_login_count >= 10
):
return R.failure(msg="账号已被锁定")
return R.failure(status=206, msg="账号已被锁定")
user.failed_login_count = 0
user.save()
login(request, user)
Expand Down

0 comments on commit 87b17d5

Please sign in to comment.