def __inner__(self, *args, **kwargs):
    identify = get_jwt_identity()
    user = models.User.find_by_username(identify)
    if (user and (user.role in ['admin', 'user'])):
        return f(self, user, *args, **kwargs)
    return ({'message': 'Not found'}, 404)
def __inner__(self, *args, **kwargs):
    identify = get_jwt_identity()
    user = models.User.find_by_username(identify)
    if (user and (user.role in ['admin', 'user'])):
        return f(self, user, *args, **kwargs)
    return ({'message': 'Not found'}, 404)