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})
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})
def delete(id): bookDAO.delete(id) return jsonify({"done":True})