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)
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)
def generate_token(booth_id, *args, **kwargs): return BoothController.generate_room(request, booth_id)
def update_booth_logo(*args, **kwargs): user = kwargs['user'].as_dict() return BoothController.update_logo(request, user)
def booth_id(booth_id, *args, **kwargs): if(request.method == 'GET'): return BoothController.show(booth_id) return BoothController.update(request, None, booth_id)
def get_exhibitors(*args, **kwargs): return BoothController.index(request)