Пример #1
0
def send_notification(*args, **kwargs):
    user = kwargs['user'].as_dict()
    if (user['role_id'] != ROLE['admin']):
        return Response(json.dumps({'message': 'unauthorized'}), status=401, mimetype='application/json')
    else:
        return AdminController.send_single_notification(request, user)
Пример #2
0
def send_notification(*args, **kwargs):
    user = kwargs['user'].as_dict()
    if (user['role_id'] != ROLE['admin']):
        return 'unauthorized'
    else:
        return AdminController.send_single_notification(request, user)