Esempio n. 1
0
def delete(id):
    #foundBooks = list(filter(lambda t: t['id']== id, books))
    #if (len(foundBooks) == 0):
    #abort(404)
    #books.remove(foundBooks[0])
    bookDAO.delete(id)
    return jsonify({"done": True})
Esempio n. 2
0
def delete(id):
    # Commented out the code needed before DAO 
    #foundBooks = list(filter(lambda b: b['id'] == id, books))
    #if len(foundBooks) == 0:
    #    abort(404)
    #books.remove(foundBooks[0])
    bookDAO.delete(id)
    return jsonify({"done":True})
Esempio n. 3
0
def delete(id):
    bookDAO.delete(id)
    return jsonify({"done":True})