Skip to content
Snippets Groups Projects
Commit 593927a7 authored by Zara Mudassar's avatar Zara Mudassar
Browse files

Edited comments on router

parent 9771a0ab
No related branches found
No related tags found
1 merge request!22Vue route guard
Pipeline #176504 passed
...@@ -7,15 +7,6 @@ import NewPasswordView from "../views/NewPasswordView"; ...@@ -7,15 +7,6 @@ import NewPasswordView from "../views/NewPasswordView";
/** /**
* Guards routes. If token is null, no user is logged in and only the * Guards routes. If token is null, no user is logged in and only the
* login page and the register page will be accessible. * login page and the register page will be accessible.
*
* Legg denne metoden i login component for å nullstille token, har ikke logg ut metode ennå
* så må nullstilles på denne måten.
* beforeMount() {
console.log("Token: " + this.$store.state.user.token);
this.$store.commit("logout");
console.log("Token etter: " + this.$store.state.user.token);
}
*
*/ */
function guardRoute(to, from, next) { function guardRoute(to, from, next) {
var isAuthenticated = false; var isAuthenticated = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment