This commit is contained in:
2025-11-14 14:47:26 +00:00
parent 69ecf2c7c1
commit 3b4876793e
104 changed files with 231517 additions and 1029 deletions
+6 -3
View File
@@ -2,8 +2,11 @@ import axios from 'axios';
import { logger } from './debugConfig';
// Use development backend URL if no custom URL is provided
const appProtocol = import.meta.env.VITE_APP_PROTOCOL;
const baseURL = `${appProtocol}://${import.meta.env.VITE_APP_API_URL}`;
const baseURL = import.meta.env.VITE_API_URL || 'http://localhost:8080';
if (!import.meta.env.VITE_API_URL) {
logger.warn('axios', '⚠️ VITE_API_URL not set, defaulting to http://localhost:8080');
}
const instance = axios.create({
baseURL,
@@ -65,4 +68,4 @@ instance.interceptors.response.use(
export const {isAxiosError} = axios;
// Export the axios instance with the type guard
export default Object.assign(instance, { isAxiosError });
export default Object.assign(instance, { isAxiosError });