示例#1
0
 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
示例#2
0
 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
示例#3
0
 def getFuelByID(self, fuid):
     dao = FuelDAO()
     result = dao.getFuelByID()
     return jsonify(Fuel=result)