Login returns also user_id
This commit is contained in:
parent
c1c052a533
commit
7142236b47
@ -92,7 +92,7 @@ def user_login():
|
|||||||
|
|
||||||
if password_hash and check_password_hash(password_hash, password):
|
if password_hash and check_password_hash(password_hash, password):
|
||||||
access_token = create_access_token(identity=str(user_from_db.id))
|
access_token = create_access_token(identity=str(user_from_db.id))
|
||||||
response = jsonify({"msg": "User logged in successfully."})
|
response = jsonify({"msg": "User logged in successfully.", "user_id": user_from_db.id})
|
||||||
set_access_cookies(response, access_token)
|
set_access_cookies(response, access_token)
|
||||||
return response
|
return response
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user