mirror of https://github.com/veops/cmdb.git
invalid username or password -> 403
This commit is contained in:
parent
9b609724bd
commit
2615fd7661
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue