Skip to content

Commit 7d867cc

Browse files
committed
fixed endpoint
1 parent 39fd77d commit 7d867cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

veto-board/src/lib/api.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Add debugging at the top to see all environment variables
22
console.log("[DEBUG] Environment mode:", import.meta.env.MODE);
33
console.log("[DEBUG] All environment variables:", import.meta.env);
4-
console.log("[DEBUG] VITE_API_BASE specifically:", import.meta.env.VITE_API_BASE);
4+
console.log("[DEBUG] VITE_API_BASE_URL specifically:", import.meta.env.VITE_API_BASE_URL);
55

6-
// FIXED: Removed the incorrect prefix from fallback URL
7-
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || "https://veto-webapp-production.up.railway.app/api";
6+
// FIXED: Use VITE_API_BASE_URL (matching .env.production) with correct fallback
7+
const API_BASE = import.meta.env.VITE_API_BASE_URL || "https://veto-webapp-production.up.railway.app/api";
88

99
console.log("[DEBUG] Final API_BASE value:", API_BASE);
1010

0 commit comments

Comments
 (0)