Skip to content

Commit

Permalink
fix apiList
Browse files Browse the repository at this point in the history
  • Loading branch information
guitavano committed Feb 13, 2025
1 parent 5f8b979 commit c7f0008
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions linx/loaders/auction/apiList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Auction[] | null> => {
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";
Expand Down

0 comments on commit c7f0008

Please sign in to comment.