forgot to read the api envvar

This commit is contained in:
john 2025-05-18 17:10:16 +02:00
parent 575a82d585
commit f1a6c54a88
2 changed files with 2 additions and 1 deletions

1
.env
View file

@ -0,0 +1 @@
VITE_API_URL=http://localhost:5181

View file

@ -2,7 +2,7 @@ import { paths } from './schema.ts'
import createClient, { Middleware } from 'openapi-fetch'
import { dispatchMessage } from '../messageBus/messageBus.ts'
const client = createClient<paths>({ baseUrl: `${location.protocol}//${location.hostname}:5181` })
const client = createClient<paths>({ baseUrl: import.meta.env.VITE_API_URL })
const UnauthorizedHandlerMiddleware: Middleware = {
async onResponse({ response }) {