Merge pull request '5832-232601-dev_test' (!65) from 5832-232601-dev_test into test
gitea/salix-front/pipeline/head This commit looks good Details

Reviewed-on: #65
Reviewed-by: Carlos Satorres Adam <carlossa@verdnatura.es>
This commit is contained in:
Carlos Satorres 2023-06-26 06:06:20 +00:00
commit efa946596f
1 changed files with 5 additions and 7 deletions

View File

@ -60,9 +60,10 @@ const onResponseError = (error) => {
if (session.isLoggedIn() && response.status === 401) {
session.destroy();
Router.push({ path: '/login' });
} else if(!session.isLoggedIn())
{
const hash = window.location.hash;
const url = hash.slice(1);
Router.push({ path: url });
} else if (!session.isLoggedIn()) {
message = 'login.loginError';
}
@ -77,7 +78,4 @@ const onResponseError = (error) => {
axios.interceptors.request.use(onRequest, onRequestError);
axios.interceptors.response.use(onResponse, onResponseError);
export {
onRequest,
onResponseError
}
export { onRequest, onResponseError };