[Library|Trunk]
Usermanagement service: remove timeout from get userinfo request git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59838 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
057e5b35ac
commit
c30d10ee1f
|
@ -2,7 +2,7 @@ import {Injectable} from '@angular/core';
|
||||||
import {HttpClient} from '@angular/common/http';
|
import {HttpClient} from '@angular/common/http';
|
||||||
import {BehaviorSubject, from, Observable, of} from "rxjs";
|
import {BehaviorSubject, from, Observable, of} from "rxjs";
|
||||||
import {COOKIE, User} from "../login/utils/helper.class";
|
import {COOKIE, User} from "../login/utils/helper.class";
|
||||||
import {catchError, map, timeout} from "rxjs/operators";
|
import {map} from "rxjs/operators";
|
||||||
import {NavigationEnd, Router} from "@angular/router";
|
import {NavigationEnd, Router} from "@angular/router";
|
||||||
import {properties} from "../../../environments/environment";
|
import {properties} from "../../../environments/environment";
|
||||||
|
|
||||||
|
@ -57,8 +57,6 @@ export class UserManagementService{
|
||||||
} else {
|
} else {
|
||||||
this.sub = this.http.get<User>(properties.userInfoUrl + token).pipe(map(userInfo => {
|
this.sub = this.http.get<User>(properties.userInfoUrl + token).pipe(map(userInfo => {
|
||||||
return this.parseUserInfo(userInfo);
|
return this.parseUserInfo(userInfo);
|
||||||
})).pipe(timeout(3000), catchError(() => {
|
|
||||||
return of(null);
|
|
||||||
})).subscribe(user => {
|
})).subscribe(user => {
|
||||||
this.getUserInfoSubject.next(user);
|
this.getUserInfoSubject.next(user);
|
||||||
if(resolve) {
|
if(resolve) {
|
||||||
|
|
Loading…
Reference in New Issue