diff options
author | HombreLaser <sebastian-440@live.com> | 2023-04-25 17:53:24 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-04-25 17:53:24 -0600 |
commit | 07ca16f41c53eccf4a9b959bd4e4656a987d8199 (patch) | |
tree | 471e27a49c77fcaa5323678dcfa3db3960387505 /src/clients | |
parent | 31cc5ecdb693be1da04ee0a3e6dc876535d5fb4b (diff) |
Añade listado de productos
Diffstat (limited to 'src/clients')
-rw-r--r-- | src/clients/loader.ts | 5 |
1 files changed, 3 insertions, 2 deletions
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 |