✨ Allow setting API endpoint via env variable
This commit is contained in:
@ -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");
|
||||
|
Reference in New Issue
Block a user