From 232b20689aeda33131568a8cc248f19bf082a4c6 Mon Sep 17 00:00:00 2001 From: lotte Date: Mon, 16 Mar 2020 16:16:29 +0100 Subject: [PATCH] remove discover requests from cache after changing state of items --- src/app/core/data/item-data.service.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/core/data/item-data.service.ts b/src/app/core/data/item-data.service.ts index b9fb36e6d8..962aed6554 100644 --- a/src/app/core/data/item-data.service.ts +++ b/src/app/core/data/item-data.service.ts @@ -180,6 +180,8 @@ export class ItemDataService extends DataService { 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 { const patchOperation = [{ op: 'replace', path: '/discoverable', value: discoverable }]; + this.requestService.removeByHrefSubstring('/discover'); + return this.getItemDiscoverableEndpoint(itemId).pipe( distinctUntilChanged(), map((endpointURL: string) =>