mirror of
https://github.com/dborth/vbagx.git
synced 2024-12-28 19:51:50 +01:00
-Hope to fix login screen issue
This commit is contained in:
parent
65104aeb2e
commit
0323aa3f80
@ -75,6 +75,7 @@ var app = new Framework7({
|
||||
http.interceptors.response.use(undefined, function (err) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
if (err.status === 401 && err.config && !err.config.__isRetryRequest) {
|
||||
console.log("Auto saliendo...");
|
||||
user.dispatch('logOut').then( () => { } ); //Untested
|
||||
}
|
||||
throw err;
|
||||
|
@ -5,7 +5,7 @@ import user from '../stores/user.js';
|
||||
function checkAuth( { resolve } ) {
|
||||
const router = this;
|
||||
if (user.getters.isLogged.value){
|
||||
router.navigate('/', { reloadCurrent: true });
|
||||
router.navigate('/', { clearPreviousHistory : true });
|
||||
}
|
||||
else {
|
||||
if (router.currentRoute.name !== "login"){
|
||||
|
Loading…
Reference in New Issue
Block a user