From c698f381b99f7a1a4bbcda68d27071fb524ccb85 Mon Sep 17 00:00:00 2001 From: nati14575 Date: Mon, 17 Aug 2026 09:58:51 +0300 Subject: [PATCH] fix(api): update BASE_API_URL to use localhost:3000 for consistency --- .../src/app/features/certificate-designer/config/designer.ts | 2 +- .../src/app/features/certificates/pages/CertificatesPage.tsx | 2 +- libs/api/src/lib/base-api/base-query-with-reauth.ts | 2 +- libs/api/src/lib/features/licensing/licensing.helpers.ts | 2 +- libs/auth/src/lib/components/AuthBootstrap.tsx | 2 +- libs/auth/src/lib/utils/refresh-token.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/backoffice/src/app/features/certificate-designer/config/designer.ts b/apps/backoffice/src/app/features/certificate-designer/config/designer.ts index 07d22cd74..f6fd5abae 100644 --- a/apps/backoffice/src/app/features/certificate-designer/config/designer.ts +++ b/apps/backoffice/src/app/features/certificate-designer/config/designer.ts @@ -3,7 +3,7 @@ import type { Bilingual, LicenseCategory, LicenseTemplate, LicenseType } from '@ /** Same resolution — and same fallback — the shared RTK Query baseQuery uses. */ export const API_BASE_URL = (import.meta as { env?: Record }).env?.['VITE_BASE_API_URL'] ?? - 'http://localhost:3001/api'; + 'http://localhost:3000/api'; export const STATUS_COLOR: Record = { DRAFT: 'gray', diff --git a/apps/portal/src/app/features/certificates/pages/CertificatesPage.tsx b/apps/portal/src/app/features/certificates/pages/CertificatesPage.tsx index 5a1235ede..89b551d54 100644 --- a/apps/portal/src/app/features/certificates/pages/CertificatesPage.tsx +++ b/apps/portal/src/app/features/certificates/pages/CertificatesPage.tsx @@ -107,7 +107,7 @@ function formatDate(value: string | null | undefined): string { const API_BASE = (import.meta as { env?: Record }).env?.['VITE_BASE_API_URL'] ?? - 'http://localhost:3001/api'; + 'http://localhost:3000/api'; async function generateCertificate(profileId: string): Promise { const token = authStorage.getToken(); diff --git a/libs/api/src/lib/base-api/base-query-with-reauth.ts b/libs/api/src/lib/base-api/base-query-with-reauth.ts index 3f9d6a094..9047cfb56 100644 --- a/libs/api/src/lib/base-api/base-query-with-reauth.ts +++ b/libs/api/src/lib/base-api/base-query-with-reauth.ts @@ -4,7 +4,7 @@ import { resolveSessionContext } from '../session'; export const BASE_API_URL = (import.meta as { env?: Record }).env?.['VITE_BASE_API_URL'] ?? - 'http://localhost:3001/api'; + 'http://localhost:3000/api'; let _onTokenExpired: (() => Promise) | null = null; let _onAuthFailure: (() => void) | null = null; diff --git a/libs/api/src/lib/features/licensing/licensing.helpers.ts b/libs/api/src/lib/features/licensing/licensing.helpers.ts index fe4d67ad0..0a9cfaba1 100644 --- a/libs/api/src/lib/features/licensing/licensing.helpers.ts +++ b/libs/api/src/lib/features/licensing/licensing.helpers.ts @@ -9,7 +9,7 @@ import type { const BASE_API_URL = (import.meta as { env?: Record }).env?.['VITE_BASE_API_URL'] ?? - 'http://localhost:3001/api'; + 'http://localhost:3000/api'; /** * Uploads a document straight to the API. diff --git a/libs/auth/src/lib/components/AuthBootstrap.tsx b/libs/auth/src/lib/components/AuthBootstrap.tsx index 769864f6f..227c1f4e4 100644 --- a/libs/auth/src/lib/components/AuthBootstrap.tsx +++ b/libs/auth/src/lib/components/AuthBootstrap.tsx @@ -6,7 +6,7 @@ import type { AuthUser } from '../types/auth.types'; const BASE_API_URL = (import.meta as { env?: Record }).env?.['VITE_BASE_API_URL'] ?? - 'http://localhost:3001/api'; + 'http://localhost:3000/api'; /** * Restores the signed-in session before the router renders. diff --git a/libs/auth/src/lib/utils/refresh-token.ts b/libs/auth/src/lib/utils/refresh-token.ts index 6a6690b80..8187473d4 100644 --- a/libs/auth/src/lib/utils/refresh-token.ts +++ b/libs/auth/src/lib/utils/refresh-token.ts @@ -3,7 +3,7 @@ import { authStorage } from "./auth-storage"; const BASE_API_URL = (import.meta as { env?: Record }).env?.[ "VITE_BASE_API_URL" - ] ?? "http://localhost:3001/api"; + ] ?? "http://localhost:3000/api"; interface RefreshResponse { token: string;