From 8d6ec7e29bdf0a08334c4a7b4b456b96236cf073 Mon Sep 17 00:00:00 2001 From: Alisha Evans Date: Tue, 22 Aug 2023 16:08:43 -0500 Subject: [PATCH] restore ability to look at individual requests again. this change is necessary because of the change in PurchaseOrdersController#index in commit 71077c6 of the api. --- utils/api/requests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/api/requests.js b/utils/api/requests.js index 1717291..1a0b0ab 100644 --- a/utils/api/requests.js +++ b/utils/api/requests.js @@ -64,7 +64,7 @@ export const getAllPOs = async (quotedWareId, uuid, requestIdentifier, accessTok // See https://github.com/vercel/swr/discussions/1988 for the RFC and https://github.com/vercel/swr/pull/2047 for the PR. const url = () => accessToken ? `quote_groups/${uuid}/quoted_wares/${quotedWareId}/purchase_orders.json` : null const data = await fetcher(url(), accessToken) - const configuredPOs = data?.map(async (po) => { + const configuredPOs = data?.purchase_orders.map(async (po) => { const purchaseOrder = await fetcher(`quote_groups/${uuid}/quoted_wares/${quotedWareId}/purchase_orders/${po.id}.json`, accessToken) return configurePO(purchaseOrder, requestIdentifier) })