예제 #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)