styling
This commit is contained in:
@@ -33,7 +33,7 @@ export class AuthGuard implements CanActivate {
|
||||
return true;
|
||||
}
|
||||
|
||||
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 });
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,7 @@ export class AuthenticatedGuard implements CanActivate {
|
||||
return that.router.navigateByUrl(that.router.parseUrl('/login?target=' + encodeURIComponent(state.url)), { skipLocationChange: true, replaceUrl: true });
|
||||
}
|
||||
|
||||
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 });
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ export class AnonymousGuard implements CanActivate {
|
||||
if (error instanceof RequestError && (error as RequestError).getResponse().status == 401) {
|
||||
return true;
|
||||
}
|
||||
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 });
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user