def deleteFuel(self, fuid): dao = FuelDAO() if not dao.getFuelByID(fuid): return jsonify(Error="Fuel not found."), 404 else: dao.delete(fuid) return jsonify(DeleteStatus="OK"), 200
def updateFuel(self, fuid, form): dao = FuelDAO() if not dao.getFuelByID(fuid): return jsonify(Error="Fuel not found."), 404 else: return jsonify(dao.getFuelByID(fuid)), 201
def getFuelByID(self, fuid): dao = FuelDAO() result = dao.getFuelByID() return jsonify(Fuel=result)