-Hope to fix login screen issue

This commit is contained in:
Juan Carlos Ruvalcaba 2021-04-30 10:07:31 -07:00
parent 65104aeb2e
commit 0323aa3f80
2 changed files with 2 additions and 1 deletions

View File

@ -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;

View File

@ -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"){