def update_drink(id): payload = request.get_json() if drink := Drink.find(id): if title := payload["title"]: drink.title = title
def remove_drink(id): if drink := Drink.find(id): drink.delete() return jsonify({"success": True, "delete": id})
def update_drink(id): payload = request.get_json() if drink := Drink.find(id): if title := payload["title"]: drink.title = title
def remove_drink(id): if drink := Drink.find(id): drink.delete() return jsonify({"success": True, "delete": id})