diff --git a/www/app/lib/apiClient.tsx b/www/app/lib/apiClient.tsx index 9c278cef..8ba11c6a 100644 --- a/www/app/lib/apiClient.tsx +++ b/www/app/lib/apiClient.tsx @@ -9,11 +9,14 @@ import { useSuspenseQuery, } from "@tanstack/react-query"; import createFetchClient from "openapi-react-query"; +import { assertExistsAndNonEmptyString } from "./utils"; + +const API_URL = assertExistsAndNonEmptyString(process.env.NEXT_PUBLIC_API_URL); // Create the base openapi-fetch client with a default URL // The actual URL will be set via middleware in AuthProvider export const client = createClient({ - baseUrl: "http://127.0.0.1:1250", + baseUrl: API_URL, }); export const $api = createFetchClient(client);