Exemplo n.º 1
0
def new_country(book_uuid, country):
    ds = DataStorage()
    if ds.add_country(book_uuid, country):
        ds.save()
    else:
        print("Failed")

    return country
Exemplo n.º 2
0
def new_country(book_uuid, country):
    ds = DataStorage()
    if ds.add_country(book_uuid, country):
        ds.save()
    else:
        print("Failed")

    return country
Exemplo n.º 3
0
def delete_recipe(uuid):
    ds = DataStorage()
    res = ds.delete_recipe(uuid)
    ds.save()

    return uuid
Exemplo n.º 4
0
def save_recipe():
    ds = DataStorage()
    new = ds.update(json.loads(request.json))
    ds.save()

    return jsonify({"was_new": new, "recipe": request.json})
Exemplo n.º 5
0
def delete_recipe(uuid):
    ds = DataStorage()
    res = ds.delete_recipe(uuid)
    ds.save()

    return uuid
Exemplo n.º 6
0
def save_recipe():
    ds = DataStorage()
    new = ds.update(json.loads(request.json))
    ds.save()

    return jsonify({"was_new":new, "recipe": request.json})