From 5b79088294c79270b5b4bd87ce89f7d99e08982e Mon Sep 17 00:00:00 2001 From: shikha Date: Wed, 29 Apr 2020 22:45:47 +0530 Subject: [PATCH] clear token and role of superadmin while login to admin and teacher --- src/event.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/event.js b/src/event.js index 353b5ae..d1aac0d 100644 --- a/src/event.js +++ b/src/event.js @@ -17,6 +17,8 @@ export default [{ this.$store.dispatch('setToken', null) this.$store.dispatch('Id', null) this.$store.dispatch('Role', null) + this.$store.dispatch('setSchoolToken', null) + this.$store.dispatch('setSchoolRole', null) this.$router.replace({ path: '/' }); } else if (this.$store.state.schoolRole === "SUPERADMIN") { this.$store.dispatch('setSchoolToken', null) @@ -26,6 +28,8 @@ export default [{ this.$store.dispatch('setToken', null) this.$store.dispatch('Id', null) this.$store.dispatch('Role', null) + this.$store.dispatch('setSchoolToken', null) + this.$store.dispatch('setSchoolRole', null) this.$router.replace({ path: '/' }); } } -- 2.0.0