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";