✨ Allow setting API endpoint via env variable
This commit is contained in:
1 parent
0eea73b780
commit
f356fb9725
1 file changed
+1
-1
+1
-1
@@ -64,7 +64,7 @@ export const parsedTimetable = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
export async function fetchData() {
|
export async function fetchData() {
|
||||||
const baseUrl = "/api";
|
const baseUrl = import.meta.env.VITE_API_ENDPOINT || "/api";
|
||||||
|
|
||||||
const checkResponse = await fetch(`${baseUrl}/check`);
|
const checkResponse = await fetch(`${baseUrl}/check`);
|
||||||
if (checkResponse.status != 200) router.push("/login");
|
if (checkResponse.status != 200) router.push("/login");
|
||||||
|
|||||||
Reference in new issue
Block a user