users/login: Provider user_id together with token

This commit is contained in:
Frank Lanitz 2021-06-21 18:41:02 +02:00
parent ea7b6391c1
commit 2f0dd2ab9f

View File

@ -99,8 +99,11 @@ def login():
if token is None: if token is None:
return make_response({}, 403) return make_response({}, 403)
return make_response({"token": token.token}) return make_response(
{
"token": token.token,
"user_id": token.user_id
})
@app.route("/users/<user_id>/profile") @app.route("/users/<user_id>/profile")
@token_auth @token_auth