fix unavailable

This commit is contained in:
_Bastler 2021-10-06 12:11:52 +02:00
parent c5db4a208a
commit d1c598a8e1

View File

@ -29,7 +29,7 @@ export class AuthGuard implements CanActivate {
return this.authService.getAuth().then(response => {
return true;
}).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;
}).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;
}).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 });
});
}