summaryrefslogtreecommitdiff
path: root/src/clients/loader.ts
blob: c529806b28378b845b77788a0d4a10bcac4c0314 (plain)
1
2
3
4
5
6
7
8
9
import { ApiClient } from "./api_client";

export default async function productLoader({ request }) {
  const client = new ApiClient();
  const url = new URL(request.url)
  const response = await client.get(url.pathname);
  
  return response.data;
}