From f99713195f822cbc1ef6e3cb56fd19c49f518b72 Mon Sep 17 00:00:00 2001 From: Markov Date: Mon, 23 Feb 2026 15:00:22 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20remove=20fallback=20URLs=20=E2=80=94=20a?= =?UTF-8?q?ll=20from=20.env.local=20only?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/api.ts | 2 +- src/lib/ws.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/api.ts b/src/lib/api.ts index 7f159e1..9d60654 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -2,7 +2,7 @@ * API client for Team Board BFF. */ -const API_BASE = process.env.NEXT_PUBLIC_API_URL || "https://team.uix.su"; +const API_BASE = process.env.NEXT_PUBLIC_API_URL!; // Required — set in .env.local function getToken(): string | null { if (typeof window === "undefined") return null; diff --git a/src/lib/ws.ts b/src/lib/ws.ts index aa9cf07..746260b 100644 --- a/src/lib/ws.ts +++ b/src/lib/ws.ts @@ -22,7 +22,11 @@ class WSClient { const token = localStorage.getItem("tb_token"); if (!token) return; - const wsBase = process.env.NEXT_PUBLIC_WS_URL || "wss://team.uix.su"; + const wsBase = process.env.NEXT_PUBLIC_WS_URL; + if (!wsBase) { + console.error("NEXT_PUBLIC_WS_URL is not set!"); + return; + } this.ws = new WebSocket(`${wsBase}/ws?token=${token}`); this.ws.onmessage = (event) => {