diff --git a/src/router/index.ts b/src/router/index.ts index 103e994..04b4901 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -22,8 +22,7 @@ import ModulePortfolio from "@/modules/13_portfolio/router"; import ModuleDevelop from "@/modules/14_IDP/router"; import ModuleProbationReport from "@/modules/15_probationReport/router"; -import { authenticated, tokenParsed } from "@/plugins/auth"; -import { ro } from "date-fns/locale"; +import { authenticated, logout } from "@/plugins/auth"; // TODO: ใช้หรือไม่? const router = createRouter({ @@ -96,7 +95,7 @@ router.beforeEach(async (to, from, next) => { if (to.meta.Auth) { const checkAuthen = await authenticated(); if (!checkAuthen && to.meta.Auth) { - router.push({ name: "loginMain" }); + logout(); } } next();