Amend API URL

This commit is contained in:
2025-07-17 14:29:10 +02:00
parent bff0b35c5f
commit b3e4f76b18
4 changed files with 12 additions and 18 deletions

View File

@@ -26,7 +26,7 @@ import {useAuthStore} from "./stores/auth.ts";
import SetsView from "./views/set/SetsView.vue";
import JobsView from "./views/JobsView.vue";
import {definePreset} from "@primeuix/themes";
import {initConfig} from "@/util/config.ts";
import {getConfig, initConfig} from "@/util/config.ts";
import axios from "axios";
// Initialize configuration from window object
@@ -139,8 +139,12 @@ router.beforeEach(async (to) => {
app.use(router);
app.use(ToastService)
const apiUrl = import.meta.env.PROD
? "/"
: `http://${getConfig().API_HOST}:${getConfig().API_PORT}`;
const axiosInstance = axios.create({
baseURL: '',
baseURL: apiUrl,
headers: {
'Content-Type': 'application/json'
}