invalid username or password -> 403

This commit is contained in:
pycook 2019-08-31 10:09:08 +08:00 committed by pycook
parent 9b609724bd
commit 2615fd7661
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class LoginView(APIView):
password = request.values.get("password") password = request.values.get("password")
user, authenticated = User.query.authenticate(username, password) user, authenticated = User.query.authenticate(username, password)
if not authenticated: if not authenticated:
return abort(401, "invalid username or password") return abort(403, "invalid username or password")
login_user(user) login_user(user)