예제 #1
0
def send_email(*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_email(request, user)
예제 #2
0
파일: api.py 프로젝트: devsummit/backend
def send_email(*args, **kwargs):
    user = kwargs['user'].as_dict()
    if (user['role_id'] != ROLE['admin']):
        return 'unauthorized'
    else:
        return AdminController.send_email(request, user)