[DSC-287] optimize code and add typedoc

This commit is contained in:
Giuseppe Digilio
2021-11-17 09:37:49 +01:00
parent a323aefc22
commit 92e9f79f09
2 changed files with 13 additions and 10 deletions

View File

@@ -12,10 +12,17 @@ import { getFirstCompletedRemoteData } from '../shared/operators';
@Injectable({
providedIn: 'root'
})
/**
* A guard that checks if root api endpoint is reachable.
* If not redirect to 500 error page
*/
export class ServerCheckGuard implements CanActivate {
constructor(private router: Router, private rootDataService: RootDataService) {
}
/**
* True when root api endpoint is reachable.
*/
canActivate(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable<boolean> {