refactor(env): replace inline process.env reads with BACKEND_URL in connector forms and hooks

This commit is contained in:
Varun Shukla 2026-05-19 01:16:02 +05:30
parent 1119f557df
commit 9e886f8274
6 changed files with 15 additions and 15 deletions

View file

@ -43,7 +43,7 @@ import {
parseOAuthAuthResponse,
validateIndexingConfigState,
} from "../constants/connector-popup.schemas";
import { BACKEND_URL } from "@/lib/env-config";
const OAUTH_RESULT_COOKIE = "connector_oauth_result";
function readOAuthResultCookie(): string | null {
@ -364,7 +364,7 @@ export const useConnectorDialog = () => {
try {
// Check if authEndpoint already has query parameters
const separator = connector.authEndpoint.includes("?") ? "&" : "?";
const url = `${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}${connector.authEndpoint}${separator}space_id=${searchSpaceId}`;
const url = `${BACKEND_URL}${connector.authEndpoint}${separator}space_id=${searchSpaceId}`;
const response = await authenticatedFetch(url, { method: "GET" });