remove discover requests from cache after changing state of items

This commit is contained in:
lotte
2020-03-16 16:16:29 +01:00
parent 930624fd19
commit 232b20689a

View File

@@ -180,6 +180,8 @@ export class ItemDataService extends DataService<Item> {
const patchOperation = [{
op: 'replace', path: '/withdrawn', value: withdrawn
}];
this.requestService.removeByHrefSubstring('/discover');
return this.getItemWithdrawEndpoint(itemId).pipe(
distinctUntilChanged(),
map((endpointURL: string) =>
@@ -201,6 +203,8 @@ export class ItemDataService extends DataService<Item> {
const patchOperation = [{
op: 'replace', path: '/discoverable', value: discoverable
}];
this.requestService.removeByHrefSubstring('/discover');
return this.getItemDiscoverableEndpoint(itemId).pipe(
distinctUntilChanged(),
map((endpointURL: string) =>