From 07ca16f41c53eccf4a9b959bd4e4656a987d8199 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Tue, 25 Apr 2023 17:53:24 -0600 Subject: AƱade listado de productos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/clients/loader.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/clients') diff --git a/src/clients/loader.ts b/src/clients/loader.ts index 645ba88..c529806 100644 --- a/src/clients/loader.ts +++ b/src/clients/loader.ts @@ -1,8 +1,9 @@ import { ApiClient } from "./api_client"; -export default async function loader(path: string, { params }) { +export default async function productLoader({ request }) { const client = new ApiClient(); - const response = await client.get(path); + const url = new URL(request.url) + const response = await client.get(url.pathname); return response.data; } \ No newline at end of file -- cgit v1.2.3