fix: auth redirect

This commit is contained in:
2023-01-30 17:51:59 +01:00
parent 07e7995ad5
commit 2960d1ffd8
+1 -1
View File
@@ -21,7 +21,7 @@ export default defineComponent({
const router = useRouter();
router.beforeEach(async (to, from, next) => {
if (store.authState != AuthState.AUTHORIZED && to.path != '/login') return next({ path: '/login' });
if (store.authState == AuthState.AUTHORIZED && to.path == '/login') return next({ path: '/' });
return next();
});