mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
74354: Handle redirects don't work
This commit is contained in:
@@ -3,7 +3,7 @@ import { Injectable } from '@angular/core';
|
|||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { take, tap } from 'rxjs/operators';
|
import { filter, take, tap } from 'rxjs/operators';
|
||||||
import { hasValue } from '../../shared/empty.util';
|
import { hasValue } from '../../shared/empty.util';
|
||||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||||
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||||
@@ -56,7 +56,7 @@ export class DsoRedirectDataService extends DataService<any> {
|
|||||||
findByIdAndIDType(id: string, identifierType = IdentifierType.UUID): Observable<RemoteData<FindByIDRequest>> {
|
findByIdAndIDType(id: string, identifierType = IdentifierType.UUID): Observable<RemoteData<FindByIDRequest>> {
|
||||||
this.setLinkPath(identifierType);
|
this.setLinkPath(identifierType);
|
||||||
return this.findById(id).pipe(
|
return this.findById(id).pipe(
|
||||||
getFinishedRemoteData(),
|
filter((response) => hasValue(response.error) || hasValue(response.payload)),
|
||||||
take(1),
|
take(1),
|
||||||
tap((response) => {
|
tap((response) => {
|
||||||
if (response.hasSucceeded) {
|
if (response.hasSucceeded) {
|
||||||
|
Reference in New Issue
Block a user