diff options
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 |