Merge pull request #1417 from VarunShukla07/fix/env-config-editor-chat-dashboard

refactor(env): replace inline process.env reads with BACKEND_URL in editor, chat, dashboard and settings
This commit is contained in:
Rohan Verma 2026-05-20 12:14:01 -07:00 committed by GitHub
commit 1a6d1ced43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 33 additions and 27 deletions

View file

@ -14,6 +14,7 @@ import { searchSpacesApiService } from "@/lib/apis/search-spaces-api.service";
import { authenticatedFetch } from "@/lib/auth-utils";
import { cacheKeys } from "@/lib/query-client/cache-keys";
import { Spinner } from "../ui/spinner";
import { BACKEND_URL } from "@/lib/env-config";
interface GeneralSettingsManagerProps {
searchSpaceId: number;
@ -48,7 +49,7 @@ export function GeneralSettingsManager({ searchSpaceId }: GeneralSettingsManager
setIsExporting(true);
try {
const response = await authenticatedFetch(
`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}/api/v1/search-spaces/${searchSpaceId}/export`,
`${BACKEND_URL}/api/v1/search-spaces/${searchSpaceId}/export`,
{ method: "GET" }
);
if (!response.ok) {

View file

@ -13,6 +13,7 @@ import { searchSpacesApiService } from "@/lib/apis/search-spaces-api.service";
import { authenticatedFetch } from "@/lib/auth-utils";
import { cacheKeys } from "@/lib/query-client/cache-keys";
import { Spinner } from "../ui/spinner";
import { BACKEND_URL } from "@/lib/env-config";
interface PromptConfigManagerProps {
searchSpaceId: number;
@ -54,7 +55,7 @@ export function PromptConfigManager({ searchSpaceId }: PromptConfigManagerProps)
};
const response = await authenticatedFetch(
`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}/api/v1/searchspaces/${searchSpaceId}`,
`${BACKEND_URL}/api/v1/searchspaces/${searchSpaceId}`,
{
method: "PUT",
headers: { "Content-Type": "application/json" },