summaryrefslogtreecommitdiff
path: root/client/src/lib/fetch-client.ts
blob: b0b60bd14d80c6606b23f377e2af441a6fbfd863 (plain)
1
2
3
4
5
6
7
8
9
10
import { PUBLIC_BASE_URL } from '$env/static/public';
import createClient from 'openapi-fetch';
import type { paths } from './api/schema.d.ts';

const client = createClient<paths>({
  // TODO: Can we make this relative?
  baseUrl: PUBLIC_BASE_URL + '/api/v1'
});

export { client };