fix: Merge dev into feat/assignment-page

This commit is contained in:
Joyelle Ndagijimana 2025-04-23 09:28:34 +02:00
commit bb3a242bf9
20 changed files with 207 additions and 37 deletions

View file

@ -142,7 +142,7 @@ const router = createRouter({
router.beforeEach(async (to, _from, next) => {
// Verify if user is logged in before accessing certain routes
if (to.meta.requiresAuth) {
if (!authService.isLoggedIn.value) {
if (!authService.isLoggedIn.value && !(await authService.loadUser())) {
next("/login");
} else {
next();