From f1a6c54a8881ffcd77529f6bf82754e2287addff Mon Sep 17 00:00:00 2001 From: john Date: Sun, 18 May 2025 17:10:16 +0200 Subject: [PATCH] forgot to read the api envvar --- .env | 1 + src/app/api/client.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.env b/.env index e69de29..922031a 100644 --- a/.env +++ b/.env @@ -0,0 +1 @@ +VITE_API_URL=http://localhost:5181 \ No newline at end of file diff --git a/src/app/api/client.ts b/src/app/api/client.ts index 095af42..792938b 100644 --- a/src/app/api/client.ts +++ b/src/app/api/client.ts @@ -2,7 +2,7 @@ import { paths } from './schema.ts' import createClient, { Middleware } from 'openapi-fetch' import { dispatchMessage } from '../messageBus/messageBus.ts' -const client = createClient({ baseUrl: `${location.protocol}//${location.hostname}:5181` }) +const client = createClient({ baseUrl: import.meta.env.VITE_API_URL }) const UnauthorizedHandlerMiddleware: Middleware = { async onResponse({ response }) {