From 6757e9e0accfb289892d6b658e8ff90180d7f23b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A4ssin=20Aouani?= Date: Tue, 12 Nov 2024 13:11:42 +0100 Subject: [PATCH] oaky --- middleware/isLoggedIn.global.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/middleware/isLoggedIn.global.ts b/middleware/isLoggedIn.global.ts index 6fc3744..e09ccb8 100644 --- a/middleware/isLoggedIn.global.ts +++ b/middleware/isLoggedIn.global.ts @@ -3,12 +3,11 @@ export default defineNuxtRouteMiddleware(async (to, from) => { if (to.fullPath !== "/stundenplan") { return true } - console.log(from.fullPath == "/stundenplan") const username = useCookie("username") const password = useCookie("password") const isLoggedIn = useState("isLoggedIn", (() => false) as () => boolean) - if (from.fullPath == "/stundenplan") { + if (!isLoggedIn.value) { try { const test_url = `https://corsproxy.io/?https%3A%2F%2Fselfservice.campus-dual.de%2Fdash%2Fgetcp%3Fuser%3D${username.value}%26hash%3D${password.value}` const response = await $fetch(test_url)