Skip to content

Commit

Permalink
Merge pull request #27 from Matsadura/login
Browse files Browse the repository at this point in the history
[UPDATE] Add user_id to login response
  • Loading branch information
Badr-Annabi authored Sep 15, 2024
2 parents 0fc17d2 + fded1ab commit cf3014e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/api/views/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ def login():
return jsonify({'error': 'Invalid email or password'}), 401

token = create_access_token(identity=user)
return jsonify({'token': token})
return jsonify({'token': token, 'user_id': user.id})

0 comments on commit cf3014e

Please sign in to comment.