fix
This commit is contained in:
parent
364b9cf4ae
commit
efd94ee0e9
1 changed files with 10 additions and 1 deletions
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue