From e7c9922d36ea82a54579c1f9e6633d4ad7ad3e74 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Wed, 4 Oct 2023 21:46:55 +0530 Subject: added login and token refreshing --- src/router/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/router') diff --git a/src/router/index.ts b/src/router/index.ts index af8e2c5..568bad8 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -64,8 +64,8 @@ const router = createRouter({ }) router.beforeEach((to, _, next) => { - if (to.meta.isAuth && !localStorage.getItem("authToken")) { - next("/login?redirected=true") + if (to.meta.isAuth && !localStorage.getItem('authToken')) { + next('/login?redirected=true') } else { next() } -- cgit v1.2.3