diff --git a/src/app/core/suggestion-notifications/qa/events/quality-assurance-event-data.service.ts b/src/app/core/suggestion-notifications/qa/events/quality-assurance-event-data.service.ts index 23e7d6a6a4..284cd8791a 100644 --- a/src/app/core/suggestion-notifications/qa/events/quality-assurance-event-data.service.ts +++ b/src/app/core/suggestion-notifications/qa/events/quality-assurance-event-data.service.ts @@ -25,7 +25,8 @@ import { SearchData, SearchDataImpl } from '../../../data/base/search-data'; import { DefaultChangeAnalyzer } from '../../../data/default-change-analyzer.service'; import { hasValue } from '../../../../shared/empty.util'; import { DeleteByIDRequest, PostRequest } from '../../../data/request.models'; -import { HttpHeaders } from '@angular/common/http'; +import { HttpHeaders, HttpParams } from '@angular/common/http'; +import { HttpOptions } from '../../../dspace-rest/dspace-rest.service'; /** * The service handling all Quality Assurance topic REST requests. @@ -207,13 +208,21 @@ export class QualityAssuranceEventDataService extends IdentifiableDataService> { + postData(target: string, correctionType: string, related: string, reason: string): Observable> { const requestId = this.requestService.generateRequestId(); const href$ = this.getBrowseEndpoint(); return href$.pipe( switchMap((href: string) => { - const request = new PostRequest(requestId, href, data, { headers: new HttpHeaders().set('Content-Type', 'text/uri-list') }); + const options: HttpOptions = Object.create({}); + let headers = new HttpHeaders(); + headers = headers.append('Content-Type', 'application/json'); + options.headers = headers; + let params = new HttpParams(); + params = params.append('target', target) + .append('correctionType', correctionType); + options.params = params; + const request = new PostRequest(requestId, href, {'reason': reason} , options); if (hasValue(this.responseMsToLive)) { request.responseMsToLive = this.responseMsToLive; } diff --git a/src/app/shared/correction-suggestion/item-withdrawn-reinstate-modal.component.html b/src/app/shared/correction-suggestion/item-withdrawn-reinstate-modal.component.html index 0c17373c40..1201fbee6f 100644 --- a/src/app/shared/correction-suggestion/item-withdrawn-reinstate-modal.component.html +++ b/src/app/shared/correction-suggestion/item-withdrawn-reinstate-modal.component.html @@ -1,5 +1,5 @@
-