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

View file

@ -49,12 +49,21 @@ export abstract class AuthGuard implements CanActivate {
params: params, params: params,
responseType: 'text', responseType: 'text',
observe: 'response', observe: 'response',
headers: {
"Error-intercept-skip":"true"
}
}) })
.toPromise() .toPromise()
.then( .then(
() => { () => {
window.open(url.origin + url.pathname, "_self"); 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; return false;
} }
else { else {