This commit is contained in:
Eduard Tihomirov 2025-03-03 11:30:56 +03:00
parent 364b9cf4ae
commit efd94ee0e9

View file

@ -49,11 +49,20 @@ export abstract class AuthGuard implements CanActivate {
params: params,
responseType: 'text',
observe: 'response',
headers: {
"Error-intercept-skip":"true"
}
})
.toPromise()
.then(
() => {
window.open(url.origin + url.pathname, "_self");
})
.catch(reason => {
const json = JSON.parse(reason.error);
json.messages.forEach((errorMessage) => {
this.messageService.error(errorMessage, json);
})
});
return false;
}