adjusted AuthGuard for BehaviorSubject in AccountService
This commit is contained in:
@@ -8,7 +8,7 @@ export class AuthGuard implements CanActivate {
|
||||
private accountService: AccountService) { }
|
||||
|
||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
|
||||
const user = this.accountService.userName;
|
||||
const user = this.accountService.userValue;
|
||||
|
||||
if (user) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user