From 3fd31245eec072c488eba1accf7f32f9f3cb5d76 Mon Sep 17 00:00:00 2001 From: Jeffrey Li Date: Mon, 17 Aug 2020 14:54:10 -0400 Subject: [PATCH] kms literally --- middleware/router-auth.ts | 4 +++- pages/index.vue | 8 ++++++-- types/schools.ts | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/middleware/router-auth.ts b/middleware/router-auth.ts index ed03133..98e4362 100644 --- a/middleware/router-auth.ts +++ b/middleware/router-auth.ts @@ -11,7 +11,8 @@ export default function({store, redirect, route} : Context) { redirect('/home') } - if(store.state.auth.user == null && (route.name == null || isAdminRoute(route))) { + if(store.state.auth.user == null && (route.name == null || isAdminRoute(route)) && route.name != "auth/Login" && route.name!="auth/Signup") { + redirect('/auth/login') }; } @@ -22,4 +23,5 @@ function isAdminRoute(route : Route) { return true } + return false } \ No newline at end of file diff --git a/pages/index.vue b/pages/index.vue index 0d87cc0..69b2a8b 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -23,7 +23,7 @@

School is hard.
Learning doesn't have to be.

Quento’s suite of tools helps you streamline your studying like never before.

- +