Exemplo n.º 1
0
	def deleteRequest(self, ReqID):
		dao = RequestDAO()
		if not dao.getRequestById(ReqID):
			return jsonify(Error = "Request not found."), 404
		else:
			dao.delete(ReqID)
			return jsonify(DeleteStatus = "OK"), 200
Exemplo n.º 2
0
 def deleteRequest(self, request_id):
     request_dao = RequestDAO()
     request_category_dao = RequestCategoryDAO()
     if not request_dao.getRequestById(request_id):
         return jsonify(Error="Request not found."), 404
     else:
         request_category_dao.delete(request_id)
         request_dao.delete(request_id)
         return jsonify(DeleteStatus="OK"), 200