|
|
@ -10,7 +10,7 @@ import { |
|
|
RouterStateSnapshot |
|
|
RouterStateSnapshot |
|
|
} from '@angular/router'; |
|
|
} from '@angular/router'; |
|
|
import { EMPTY } from 'rxjs'; |
|
|
import { EMPTY } from 'rxjs'; |
|
|
import { catchError } from 'rxjs/operators'; |
|
|
import { catchError, finalize } from 'rxjs/operators'; |
|
|
|
|
|
|
|
|
@Service() |
|
|
@Service() |
|
|
export class AuthGuard { |
|
|
export class AuthGuard { |
|
|
@ -59,6 +59,9 @@ export class AuthGuard { |
|
|
|
|
|
|
|
|
resolve(true); |
|
|
resolve(true); |
|
|
return EMPTY; |
|
|
return EMPTY; |
|
|
|
|
|
}), |
|
|
|
|
|
finalize(() => { |
|
|
|
|
|
resolve(false); |
|
|
}) |
|
|
}) |
|
|
) |
|
|
) |
|
|
.subscribe((user) => { |
|
|
.subscribe((user) => { |
|
|
|