fix: remove fallback URLs — all from .env.local only
All checks were successful
Deploy Web Client / deploy (push) Successful in 36s
All checks were successful
Deploy Web Client / deploy (push) Successful in 36s
This commit is contained in:
parent
1aa0d3923f
commit
f99713195f
@ -2,7 +2,7 @@
|
|||||||
* API client for Team Board BFF.
|
* 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 {
|
function getToken(): string | null {
|
||||||
if (typeof window === "undefined") return null;
|
if (typeof window === "undefined") return null;
|
||||||
|
|||||||
@ -22,7 +22,11 @@ class WSClient {
|
|||||||
const token = localStorage.getItem("tb_token");
|
const token = localStorage.getItem("tb_token");
|
||||||
if (!token) return;
|
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 = new WebSocket(`${wsBase}/ws?token=${token}`);
|
||||||
|
|
||||||
this.ws.onmessage = (event) => {
|
this.ws.onmessage = (event) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user