Esempio n. 1
0
def booth(*args, **kwargs):
    user = kwargs['user'].as_dict()
    if(request.method == 'PUT' or request.method == 'PATCH'):
        if(user['role_id'] == ROLE['booth']):
            return BoothController.update(request, user['id'])
        return Response(json.dumps({'message': 'unauthorized'}), status=401, mimetype='application/json')
    elif(request.method == 'POST'):
        return BoothController.create(request)
Esempio n. 2
0
def booth(*args, **kwargs):
    user = kwargs['user'].as_dict()
    if(request.method == 'PUT' or request.method == 'PATCH'):
        if(user['role_id'] == ROLE['booth']):
            return BoothController.update(request, user['id'])
        return 'Unauthorized'
    elif(request.method == 'POST'):
        return BoothController.create(request)
    elif(request.method == 'GET'):
        return BoothController.index(request)
Esempio n. 3
0
def generate_token(booth_id, *args, **kwargs):
    
    return BoothController.generate_room(request, booth_id)
Esempio n. 4
0
def update_booth_logo(*args, **kwargs):
    user = kwargs['user'].as_dict()
    return BoothController.update_logo(request, user)
Esempio n. 5
0
def booth_id(booth_id, *args, **kwargs):
    if(request.method == 'GET'):
        return BoothController.show(booth_id)
    return BoothController.update(request, None, booth_id)
Esempio n. 6
0
def get_exhibitors(*args, **kwargs):
    return BoothController.index(request)