def update_location(): allowed_keys = ['city_locat', 'state_locat', 'id_locat', 'id_usu'] keys = base.check_request_params(allowed_keys, request.json) extra_locat = None if 'extra_locat' in keys: extra_locat = keys['extra_locat'] return location.update_location(keys['city_locat'], keys['state_locat'], extra_locat, keys['id_locat'], keys['id_usu'])
def update_room(): allowed_keys = ['locat_key', 'university_key', 'description', 'title', 'id_usu', 'price', 'id_room'] keys = base.check_request_params(allowed_keys, request.json) republic_key = None if 'republic_key' in keys: republic_key = keys['republic_key'] return room.update_room(keys['locat_key'], keys['university_key'], republic_key, keys['description'], keys['title'], keys['price'], keys['id_usu'], keys['id_room'])
def create_location(): allowed_keys = ['city_locat', 'state_locat', 'id_usu'] keys = base.check_request_params(allowed_keys, request.json) extra_locat = None if 'extra_locat' in keys: extra_locat = keys['extra_locat'] return location.create_location(keys['city_locat'], keys['state_locat'], extra_locat, keys['id_usu'])
def update_room(): allowed_keys = [ 'locat_key', 'university_key', 'description', 'title', 'id_usu', 'price', 'id_room' ] keys = base.check_request_params(allowed_keys, request.json) republic_key = None if 'republic_key' in keys: republic_key = keys['republic_key'] return room.update_room(keys['locat_key'], keys['university_key'], republic_key, keys['description'], keys['title'], keys['price'], keys['id_usu'], keys['id_room'])
def reset_password(): allowed_keys = ['email'] keys = base.check_request_params(allowed_keys, request.json) return user.reset_password(keys['email'])
def update_password_user(): allowed_keys = ['password','id_usu'] keys = base.check_request_params(allowed_keys, request.json) return user.update_password_user(keys['password'], keys['id_usu'])
def update_user(): allowed_keys = ['name','email','phone','id_usu'] keys = base.check_request_params(allowed_keys, request.json) return user.update_user(keys['name'], keys['email'], keys['phone'], keys['id_usu'])
def new_user(): allowed_keys = ['email','password','name','phone'] keys = base.check_request_params(allowed_keys, request.json) return user.new_user(keys['email'], keys['password'], keys['name'], keys['phone'])
def send_email_interested(): allowed_keys = ['email_owner', 'email_usu', 'subject', 'message'] keys = base.check_request_params(allowed_keys, request.json) return room.send_email_interested(keys['email_owner'], keys['email_usu'], keys['subject'], keys['message'])
def update_republic(): allowed_keys = ['name', 'key_locat', 'id_usu', 'id_rep'] keys = base.check_request_params(allowed_keys, request.json) return republic.update_republic(keys['name'], keys['key_locat'], keys['id_rep'], keys['id_usu'])
def update_password_user(): allowed_keys = ['password', 'id_usu'] keys = base.check_request_params(allowed_keys, request.json) return user.update_password_user(keys['password'], keys['id_usu'])
def update_user(): allowed_keys = ['name', 'email', 'phone', 'id_usu'] keys = base.check_request_params(allowed_keys, request.json) return user.update_user(keys['name'], keys['email'], keys['phone'], keys['id_usu'])
def new_user(): allowed_keys = ['email', 'password', 'name', 'phone'] keys = base.check_request_params(allowed_keys, request.json) return user.new_user(keys['email'], keys['password'], keys['name'], keys['phone'])
def update_university(): allowed_keys = ['name', 'key_locat', 'id_uni', 'id_usu'] keys = base.check_request_params(allowed_keys, request.json) return university.update_university(keys['name'], keys['key_locat'], keys['id_uni'], keys['id_usu'])