Exemplo n.º 1
0
def get_shelves():
    all_shelves = Shelf.read_all_shelves()
    if all_shelves:
        return jsonify(all_shelves), 200
    else:
        return "Self not found", 400
Exemplo n.º 2
0
def read_all_shelves():
    try:
        shelves = Shelf.read_all_shelves()
        return jsonify(shelves), 200
    except:
        return 'not found', 400