diff --git a/frontend/admin/src/router.js b/frontend/admin/src/router.js index 1e67427..7df8623 100644 --- a/frontend/admin/src/router.js +++ b/frontend/admin/src/router.js @@ -73,6 +73,8 @@ router.beforeEach((to, from, next) => { if (to.meta.requiresAuth !== false && !authStore.isAuthenticated) { next('/login'); + } else if (to.path === '/login' && authStore.isAuthenticated) { + next('/'); } else { next(); }