Commit 04568aac authored by Adrian's avatar Adrian

Validando rutas y session

parent 7005c69a
......@@ -408,7 +408,7 @@ export default {
const menus = this.getModules(this.$storage.get('modules'), rol);
this.$storage.set('menu', menus);
this.$store.commit('setMenu', menus);
this.$router.push('/');
if (this.$route.path !== '/') this.$router.push('/');
},
handleMiniVariant() {
this.$store.commit('setDrawer', !this.drawer);
......
......@@ -200,8 +200,10 @@ export default {
}
if (error.response.status === 401) {
if (window.location.hash !== '#/login') {
console.log(router);
Message.error('Termino la session');
router.push('/login');
instance.logout(router, store);
store.commit('setAuth', false);
}
}
if (error.response.status === 402) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment