예제 #1
0
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'])
예제 #2
0
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'])
예제 #3
0
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'])
예제 #4
0
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'])
예제 #5
0
def reset_password():
    allowed_keys = ['email']
    keys = base.check_request_params(allowed_keys, request.json)
    return user.reset_password(keys['email'])
예제 #6
0
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'])
예제 #7
0
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'])
예제 #8
0
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'])
예제 #9
0
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'])
예제 #10
0
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'])
예제 #11
0
def reset_password():
    allowed_keys = ['email']
    keys = base.check_request_params(allowed_keys, request.json)
    return user.reset_password(keys['email'])
예제 #12
0
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'])
예제 #13
0
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'])
예제 #14
0
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'])
예제 #15
0
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'])
예제 #16
0
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'])
예제 #17
0
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'])
예제 #18
0
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'])