mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
fix: run prettier on all file to avoid prettier issue inside PR
This commit is contained in:
@@ -10,14 +10,14 @@ import { Observable, map } from 'rxjs';
|
||||
export class IsAuthorizedGuard implements CanActivate {
|
||||
constructor(
|
||||
private authorizationService: AuthorizationService,
|
||||
private router: Router
|
||||
private router: Router,
|
||||
) {}
|
||||
|
||||
canActivate(): Observable<boolean | UrlTree> {
|
||||
return this.authorizationService.isAuthorized$.pipe(
|
||||
map((isAuthorized) =>
|
||||
isAuthorized ? true : this.router.createUrlTree(['forbidden'])
|
||||
)
|
||||
isAuthorized ? true : this.router.createUrlTree(['forbidden']),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user