mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
remove discover requests from cache after changing state of items
This commit is contained in:
@@ -180,6 +180,8 @@ export class ItemDataService extends DataService<Item> {
|
|||||||
const patchOperation = [{
|
const patchOperation = [{
|
||||||
op: 'replace', path: '/withdrawn', value: withdrawn
|
op: 'replace', path: '/withdrawn', value: withdrawn
|
||||||
}];
|
}];
|
||||||
|
this.requestService.removeByHrefSubstring('/discover');
|
||||||
|
|
||||||
return this.getItemWithdrawEndpoint(itemId).pipe(
|
return this.getItemWithdrawEndpoint(itemId).pipe(
|
||||||
distinctUntilChanged(),
|
distinctUntilChanged(),
|
||||||
map((endpointURL: string) =>
|
map((endpointURL: string) =>
|
||||||
@@ -201,6 +203,8 @@ export class ItemDataService extends DataService<Item> {
|
|||||||
const patchOperation = [{
|
const patchOperation = [{
|
||||||
op: 'replace', path: '/discoverable', value: discoverable
|
op: 'replace', path: '/discoverable', value: discoverable
|
||||||
}];
|
}];
|
||||||
|
this.requestService.removeByHrefSubstring('/discover');
|
||||||
|
|
||||||
return this.getItemDiscoverableEndpoint(itemId).pipe(
|
return this.getItemDiscoverableEndpoint(itemId).pipe(
|
||||||
distinctUntilChanged(),
|
distinctUntilChanged(),
|
||||||
map((endpointURL: string) =>
|
map((endpointURL: string) =>
|
||||||
|
Reference in New Issue
Block a user