From bef3da2a567e3804e12355d9c3d5c09439dbe2ea Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Thu, 17 Jul 2025 23:42:55 +0200 Subject: Humble beginnings Redirect to login if not logged in, on login session cookie is set and projects or reviews are listed. --- client/src/lib/fetch-client.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 client/src/lib/fetch-client.ts (limited to 'client/src/lib/fetch-client.ts') diff --git a/client/src/lib/fetch-client.ts b/client/src/lib/fetch-client.ts new file mode 100644 index 0000000..b0b60bd --- /dev/null +++ b/client/src/lib/fetch-client.ts @@ -0,0 +1,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({ + // TODO: Can we make this relative? + baseUrl: PUBLIC_BASE_URL + '/api/v1' +}); + +export { client }; -- cgit v1.2.3-70-g09d2