changes to auth and user API
This commit is contained in:
@@ -22,6 +22,18 @@ user = api_user.model('User', {
|
||||
})
|
||||
|
||||
|
||||
@api_user.route('/profile', methods=['GET'])
|
||||
class Profile(Resource):
|
||||
@jwt_auth.login_required
|
||||
@api_user.marshal_list_with(user)
|
||||
def get(self):
|
||||
"""Get infos about logged in user."""
|
||||
current_user_id = get_jwt_identity()
|
||||
app.logger.info(current_user_id)
|
||||
return User.get_by_identifier(current_user_id)
|
||||
|
||||
|
||||
|
||||
@api_user.route('/')
|
||||
class UserList(Resource):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user