Skip to content

Commit

Permalink
Send to login page on invalid session
Browse files Browse the repository at this point in the history
  • Loading branch information
LucHeart committed Sep 24, 2024
1 parent 35ca637 commit 0f248ea
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,12 @@ const store = createStore({
});
console.log("Successfully fetched self");
return;
} else if(res.status === 401) {
emitter.emit('logout');
return;
} else console.log("Self status code is " + res.status + " with message " + res.data);
} catch (e) {
console.log(e);
}
console.log("Seems like the session is invalid, expired or user just never logged in, sending to login page");
emitter.emit('logout');
},
setReturnUrl({ commit }, url) {
commit('setReturnUrl', url);
Expand Down

0 comments on commit 0f248ea

Please sign in to comment.