def get(self): orders = OrdersModel.get_orders() return orders, 200
def get(self): orders = OrdersModel.get_orders()['orders'] orders_list = [order for order in orders if order['state'] == 2] return {'orders': orders_list}, 200
def _get_orders(self): return OrdersModel.get_orders()['orders']