def get(self, user_id): user = UserModel.find_by_id(user_id) return {'username': user.username, 'access_level': user.access}
def identity(payload): user_id = payload["identity"] return UserModel.find_by_id(user_id)