new fix to apli?

This commit is contained in:
chris 2025-07-31 10:52:15 -04:00
parent f7e8eb9be3
commit 236de3fb16

View File

@ -66,8 +66,8 @@
// --- API Calls ---
// MODIFIED: This now points to the full server address, including the port.
const API_BASE_URL = `${window.location.protocol}//${window.location.hostname}:3000/api`;
async function apiCall(endpoint, method = 'GET', body = null) {
const API_BASE_URL = '/api';
async function apiCall(endpoint, method = 'GET', body = null) {
const headers = { 'Content-Type': 'application/json' };
if (authToken) headers['Authorization'] = `Bearer ${authToken}`;
try {