collection-source.component.ts (dspace-angular-dspace-7.0) | : | collection-source.component.ts (dspace-angular-dspace-7.1) | ||
---|---|---|---|---|
skipping to change at line 383 | skipping to change at line 383 | |||
* Submit the edited Content Source to the REST API, re-initialize the field u pdate and display a notification | * Submit the edited Content Source to the REST API, re-initialize the field u pdate and display a notification | |||
*/ | */ | |||
onSubmit() { | onSubmit() { | |||
// Remove cached harvester request to allow for latest harvester to be displ ayed when switching tabs | // Remove cached harvester request to allow for latest harvester to be displ ayed when switching tabs | |||
this.collectionRD$.pipe( | this.collectionRD$.pipe( | |||
getFirstSucceededRemoteData(), | getFirstSucceededRemoteData(), | |||
map((col) => col.payload.uuid), | map((col) => col.payload.uuid), | |||
switchMap((uuid) => this.collectionService.getHarvesterEndpoint(uuid)), | switchMap((uuid) => this.collectionService.getHarvesterEndpoint(uuid)), | |||
take(1) | take(1) | |||
).subscribe((endpoint) => this.requestService.removeByHrefSubstring(endpoint )); | ).subscribe((endpoint) => this.requestService.removeByHrefSubstring(endpoint )); | |||
this.requestService.setStaleByHrefSubstring(this.contentSource._links.self.h ref); | ||||
// Update harvester | // Update harvester | |||
this.collectionRD$.pipe( | this.collectionRD$.pipe( | |||
getFirstSucceededRemoteData(), | getFirstSucceededRemoteData(), | |||
map((col) => col.payload.uuid), | map((col) => col.payload.uuid), | |||
switchMap((uuid) => this.collectionService.updateContentSource(uuid, this. contentSource)), | switchMap((uuid) => this.collectionService.updateContentSource(uuid, this. contentSource)), | |||
take(1) | take(1) | |||
).subscribe((result: ContentSource | INotification) => { | ).subscribe((result: ContentSource | INotification) => { | |||
if (hasValue((result as any).harvestType)) { | if (hasValue((result as any).harvestType)) { | |||
this.clearNotifications(); | this.clearNotifications(); | |||
this.initializeOriginalContentSource(result as ContentSource); | this.initializeOriginalContentSource(result as ContentSource); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |