diff --git a/src/app/core/data/item-template-data.service.ts b/src/app/core/data/item-template-data.service.ts index d157c09a7c..a44d48e9bd 100644 --- a/src/app/core/data/item-template-data.service.ts +++ b/src/app/core/data/item-template-data.service.ts @@ -16,9 +16,10 @@ import { NotificationsService } from '../../shared/notifications/notifications.s import { HttpClient } from '@angular/common/http'; import { BrowseService } from '../browse/browse.service'; import { CollectionDataService } from './collection-data.service'; -import { switchMap } from 'rxjs/operators'; +import { switchMap, map } from 'rxjs/operators'; import { BundleDataService } from './bundle-data.service'; import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model'; +import { RestResponse } from '../cache/response.models'; /* tslint:disable:max-classes-per-file */ /** @@ -121,7 +122,7 @@ class DataServiceImpl extends ItemDataService { */ deleteByCollectionID(item: Item, collectionID: string): Observable { this.setRegularEndpoint(); - return super.delete(item.uuid); + return super.delete(item.uuid).pipe(map((response: RestResponse) => response.isSuccessful)); } }