def getAllOrders(self): dao = OrderDAO() order_list = dao.getAllOrders() result_list = [] for row in order_list: result = self.build_order_dict(row) result_list.append(result) return jsonify(Order=result_list)
def getAllOrders(self): dao = OrderDAO() orders_list = dao.getAllOrders( ) #Select oid, odate, oprice, ostatus from Order_Info result_list = [] for row in orders_list: result = self.build_orders_dict(row) result_list.append(result) if not result_list: return jsonify(Error="Order Not Found"), 404 else: return jsonify(Orders=result_list)
def getAllOrders(self): dao = OrderDAO() result = dao.getAllOrders() result_list = self.fixDict(result) return jsonify(Orders=result_list)