mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Issue 964 make solution synchronous
This commit is contained in:
@@ -88,10 +88,10 @@ export class EntityTypeService extends DataService<ItemType> {
|
||||
* @param label
|
||||
*/
|
||||
getEntityTypeByLabel(label: string): Observable<RemoteData<ItemType>> {
|
||||
let endPoint;
|
||||
this.halService.getEndpoint(this.linkPath).pipe(take(1)).subscribe((result) => {
|
||||
endPoint = result;
|
||||
});
|
||||
return this.findByHref(endPoint + '/label/' + label);
|
||||
return this.halService.getEndpoint(this.linkPath).pipe(
|
||||
take(1),
|
||||
switchMap((endPoint: string) =>
|
||||
this.findByHref(endPoint + '/label/' + label))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user