Commit 5b79088294c79270b5b4bd87ce89f7d99e08982e

Authored by Shikha Mishra
1 parent 8c3acf4a97

clear token and role of superadmin while login to admin and teacher

Showing 1 changed file with 4 additions and 0 deletions   Show diff stats
... ... @@ -17,6 +17,8 @@ export default [{
17 17 this.$store.dispatch('setToken', null)
18 18 this.$store.dispatch('Id', null)
19 19 this.$store.dispatch('Role', null)
  20 + this.$store.dispatch('setSchoolToken', null)
  21 + this.$store.dispatch('setSchoolRole', null)
20 22 this.$router.replace({ path: '/' });
21 23 } else if (this.$store.state.schoolRole === "SUPERADMIN") {
22 24 this.$store.dispatch('setSchoolToken', null)
... ... @@ -26,6 +28,8 @@ export default [{
26 28 this.$store.dispatch('setToken', null)
27 29 this.$store.dispatch('Id', null)
28 30 this.$store.dispatch('Role', null)
  31 + this.$store.dispatch('setSchoolToken', null)
  32 + this.$store.dispatch('setSchoolRole', null)
29 33 this.$router.replace({ path: '/' });
30 34 }
31 35 }
... ...