fix unavailable
This commit is contained in:
parent
c5db4a208a
commit
d1c598a8e1
@ -29,7 +29,7 @@ export class AuthGuard implements CanActivate {
|
|||||||
return this.authService.getAuth().then(response => {
|
return this.authService.getAuth().then(response => {
|
||||||
return true;
|
return true;
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
return that.router.navigateByUrl(that.router.parseUrl('/unavailable?target=' + next.url), { skipLocationChange: true });
|
return that.router.navigateByUrl(that.router.parseUrl('/unavailable?target=' + encodeURIComponent(state.url)), { skipLocationChange: true });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -74,7 +74,7 @@ export class AuthenticatedGuard implements CanActivate {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
return that.router.navigateByUrl(that.router.parseUrl('/unavailable?target=' + next.url), { skipLocationChange: true });
|
return that.router.navigateByUrl(that.router.parseUrl('/unavailable?target=' + encodeURIComponent(state.url)), { skipLocationChange: true });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ export class AnonymousGuard implements CanActivate {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
return that.router.navigateByUrl(that.router.parseUrl('/unavailable?target=' + next.url), { replaceUrl: true });
|
return that.router.navigateByUrl(that.router.parseUrl('/unavailable?target=' + encodeURIComponent(state.url)), { replaceUrl: true });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user