Esempio n. 1
0
 def deletePart(self, pid):
     dao = PartsDAO()
     if not dao.getPartById(pid):
         return jsonify(Error="Part not found."), 404
     else:
         dao.delete(pid)
         return jsonify(DeleteStatus="OK"), 200
Esempio n. 2
0
 def deleteParts(self, Partsid):
     dao = PartsDAO()
     if not dao.getPartsById(Partsid):
         return jsonify(Error="Resource not found."), 404
     else:
         dao.delete(Partsid)
         return jsonify(DeleteStatus="OK"), 200