refactor(web): replace instances of BACKEND_URL with buildBackendUrl for improved URL handling

This commit is contained in:
Anish Sarkar 2026-06-16 14:51:25 +05:30
parent 371ff866c7
commit 3f69bfd5e4
21 changed files with 98 additions and 95 deletions

View file

@ -12,7 +12,7 @@ import { Label } from "@/components/ui/label";
import { Skeleton } from "@/components/ui/skeleton";
import { searchSpacesApiService } from "@/lib/apis/search-spaces-api.service";
import { authenticatedFetch } from "@/lib/auth-utils";
import { BACKEND_URL } from "@/lib/env-config";
import { buildBackendUrl } from "@/lib/env-config";
import { cacheKeys } from "@/lib/query-client/cache-keys";
import { Spinner } from "../ui/spinner";
@ -49,7 +49,7 @@ export function GeneralSettingsManager({ searchSpaceId }: GeneralSettingsManager
setIsExporting(true);
try {
const response = await authenticatedFetch(
`${BACKEND_URL}/api/v1/search-spaces/${searchSpaceId}/export`,
buildBackendUrl(`/api/v1/search-spaces/${searchSpaceId}/export`),
{ method: "GET" }
);
if (!response.ok) {