コード例 #1
0
ファイル: fuel.py プロジェクト: ErickRodz/ResourcesApp
 def deleteFuel(self, Fuelid):
     dao = FuelDAO()
     if not dao.getFuelById(Fuelid):
         return jsonify(Error="Resource not found."), 404
     else:
         dao.delete(Fuelid)
         return jsonify(DeleteStatus="OK"), 200
コード例 #2
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
コード例 #3
0
 def deleteFuel(self, fuel_id):
     fuel_dao = FuelDAO()
     if not fuel_dao.getFuelById(fuel_id):
         return jsonify(Error="Fuel not found."), 404
     else:
         resource_id = fuel_dao.delete(fuel_id)
         resource_dao = ResourceDAO()
         resource_dao.delete(resource_id)
         return jsonify(DeleteStatus="OK"), 200