From 4152012838be460787a3b54f262de75a7c4a69ce Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Wed, 22 Jul 2026 17:45:10 +0800 Subject: [PATCH] Point notification API base URL at DEFAULT_NOTIFY_API_SERVER. Keep debug localStorage overrides first; fall back to the dedicated notify-api default instead of APP_SERVER. --- src/services/notifications/NotificationDebugConfig.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/services/notifications/NotificationDebugConfig.ts b/src/services/notifications/NotificationDebugConfig.ts index 0850bfe5..7b1f9de7 100644 --- a/src/services/notifications/NotificationDebugConfig.ts +++ b/src/services/notifications/NotificationDebugConfig.ts @@ -3,7 +3,7 @@ * Persists overrides in localStorage; production defaults apply when unset. */ -import { APP_SERVER } from "@/constants/app"; +import { DEFAULT_NOTIFY_API_SERVER } from "@/constants/app"; const LOG = "[NotificationDebug]"; const STORAGE_KEY_BACKEND_URL = "notificationDebug.backendBaseUrl"; @@ -45,7 +45,7 @@ function writeStorage(key: string, value: string | null): void { } } -/** Backend URL override, or null when using the default app server. */ +/** Backend URL override, or null when using the default Notification API. */ export function getBackendBaseUrl(): string | null { const raw = readStorage(STORAGE_KEY_BACKEND_URL); if (raw === null) { @@ -101,12 +101,15 @@ export function setBypassAuth(enabled: boolean): void { /** * Base URL for `/notifications/*` API calls. - * Uses debug override when set; otherwise the built-in app server (production default). + * Uses debug override when set; otherwise DEFAULT_NOTIFY_API_SERVER. */ export function getNotificationApiBaseUrl(): string { const override = getBackendBaseUrl(); if (override) { return override; } - return normalizeNotificationBackendUrl(APP_SERVER) ?? APP_SERVER; + return ( + normalizeNotificationBackendUrl(DEFAULT_NOTIFY_API_SERVER) ?? + DEFAULT_NOTIFY_API_SERVER + ); }