From e6bed48d66fcbcf99ba2e90c9a13b4b713eb3363 Mon Sep 17 00:00:00 2001 From: Ravi Lodhi Date: Thu, 24 Oct 2024 18:38:54 +0530 Subject: [PATCH] Improved: Returned list of good identifications directly while fetching (#91). --- src/modules/product/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/product/index.ts b/src/modules/product/index.ts index 34734e1..5900462 100644 --- a/src/modules/product/index.ts +++ b/src/modules/product/index.ts @@ -183,9 +183,9 @@ async function fetchGoodIdentificationTypes(parentTypeId: string = "HC_GOOD_ID_T }) as any if (!hasError(resp)) { - return Promise.resolve(resp.data) + return Promise.resolve(resp.data.docs) } else { - throw resp.data.docs; + throw resp.data; } } catch (err) { return Promise.reject({