From c7f0008543700a76046dcd39c0118c4bf2ca179c Mon Sep 17 00:00:00 2001 From: guitavano Date: Thu, 13 Feb 2025 13:26:41 -0300 Subject: [PATCH] fix apiList --- linx/loaders/auction/apiList.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/linx/loaders/auction/apiList.ts b/linx/loaders/auction/apiList.ts index 9f09ef04a..6caad0bfb 100644 --- a/linx/loaders/auction/apiList.ts +++ b/linx/loaders/auction/apiList.ts @@ -5,23 +5,21 @@ import type { AppContext } from "../../../linx/mod.ts"; * @title Linx Integration * @description Search Wishlist loader */ -const loader = ( +const loader = async ( _props: unknown, _req: Request, ctx: AppContext, ): Promise => { const { layer } = ctx; - const responsePromise = layer + const responsePromise = await layer ["POST /v1/Catalog/API.svc/web/SearchProductAuctions"]( {}, // @ts-ignore body is required { body: {} }, - ).then(async (response) => { - return await response.json(); - }); + ); - return responsePromise; + return await responsePromise.json(); }; export const cache = "stale-while-revalidate";