From f356fb97256448407f21e5d106e8e5ec5295d971 Mon Sep 17 00:00:00 2001 From: minie4 Date: Fri, 20 May 2022 00:05:57 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Allow=20setting=20API=20endpoint=20?= =?UTF-8?q?via=20env=20variable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store.js b/src/store.js index 0a9ddc4..44f19db 100644 --- a/src/store.js +++ b/src/store.js @@ -64,7 +64,7 @@ export const parsedTimetable = computed(() => { }); export async function fetchData() { - const baseUrl = "/api"; + const baseUrl = import.meta.env.VITE_API_ENDPOINT || "/api"; const checkResponse = await fetch(`${baseUrl}/check`); if (checkResponse.status != 200) router.push("/login");