예제 #1
0
def archive():
    if request.json:
        log.info('/api/archive: ' + service.archive(request.json))
        return 'archive OK!'

    else:
        print('no json received')
        return 'no json received'
예제 #2
0
def new_parcel():
    if request.json:
        result = service.new_parcel(request.json)
        log.info('/api/new-parcel: ' + result)
        return result  # success = room_id, fail = 'Wrong email address format'
    else:
        print('no json received')
        return 'no json received'
예제 #3
0
def new_parcel():
    if request.json:
        result = service.new_parcel(request.json)
        log.info('/api/new-parcel: ' + result)
        return result  # success = room_id, fail = 'Wrong email address format'
    else:
        print('no json received')
        return 'no json received'
예제 #4
0
def update_tenant():
    if request.json:
        log.info('/api/update-tenant: ' + service.update_tenant(request.json))
        return 'update-tenant OK!'

    else:
        print('no json received')
        return 'no json received'
예제 #5
0
def delete_room():
    if request.json:
        log.info('/api/delete-room: ' + service.delete_room(request.json))
        return 'delete-room OK!'

    else:
        print('no json received')
        return 'no json received'
예제 #6
0
def delete_room():
    if request.json:
        log.info('/api/delete-room: ' + service.delete_room(request.json))
        return 'delete-room OK!'

    else:
        print('no json received')
        return 'no json received'
예제 #7
0
def update_tenant():
    if request.json:
        log.info('/api/update-tenant: ' + service.update_tenant(request.json))
        return 'update-tenant OK!'

    else:
        print('no json received')
        return 'no json received'
예제 #8
0
def new_room():
    if request.json:
        log.info('/api/new-room: ' + service.new_room(request.json))
        return 'new-room OK!'

    else:
        print('no json received')
        return 'no json received'
예제 #9
0
def new_room():
    if request.json:
        log.info('/api/new-room: ' + service.new_room(request.json))
        return 'new-room OK!'

    else:
        print('no json received')
        return 'no json received'
예제 #10
0
def archive():
    if request.json:
        log.info('/api/archive: ' + service.archive(request.json))
        return 'archive OK!'

    else:
        print('no json received')
        return 'no json received'
예제 #11
0
def get_room(room_id):
    log.info('/api/room/' + room_id)
    return jsonify({'room': service.get_room(room_id)})
예제 #12
0
def get_rooms(house_name):
    log.info('/api/rooms/' + house_name)
    return jsonify({'rooms': service.get_rooms(house_name)})
예제 #13
0
def get_houses():
    log.info('/api/houses')
    return jsonify({'houses': service.get_houses()})
예제 #14
0
def get_students(house_name):
    log.info('/api/tenants/' + house_name)
    return jsonify({'tenants': service.get_tenants(house_name)})
예제 #15
0
def root():
    log.info('access index.html')
    return app.send_static_file('index.html')
예제 #16
0
def get_students(house_name):
    log.info('/api/tenants/' + house_name)
    return jsonify({'tenants': service.get_tenants(house_name)})
예제 #17
0
def get_rooms(house_name):
    log.info('/api/rooms/' + house_name)
    return jsonify({'rooms': service.get_rooms(house_name)})
예제 #18
0
def check_log(room_id):
    log.info('/api/rooms/' + room_id)
    return jsonify({'logs': service.check_log(room_id)})
예제 #19
0
def get_logs(state):
    log.info('/api/log/' + state)
    return jsonify({'logs': service.get_logs(state)})
예제 #20
0
def get_room(room_id):
    log.info('/api/room/' + room_id)
    return jsonify({'room': service.get_room(room_id)})
예제 #21
0
def check_log(room_id):
    log.info('/api/rooms/' + room_id)
    return jsonify({'logs': service.check_log(room_id)})
예제 #22
0
def get_houses():
    log.info('/api/houses')
    return jsonify({'houses': service.get_houses()})
예제 #23
0
def get_logs(state):
    log.info('/api/log/' + state)
    return jsonify({'logs': service.get_logs(state)})
예제 #24
0
def hello_world():
    log.info('Hello World!')
    return 'Hello World!'
예제 #25
0
def hello_world():
    log.info('Hello World!')
    return 'Hello World!'
예제 #26
0
def root():
    log.info('access index.html')
    return app.send_static_file('index.html')