mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 10:34:15 +00:00
Merge remote-tracking branch 'atmire-github/fix-submission-lost-changes-after-save-7.6' into fix-submission-lost-changes-after-save-8.0.0-next
This commit is contained in:
@@ -156,7 +156,7 @@ describe('JsonPatchOperationsService test suite', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should send a new SubmissionPatchRequest', () => {
|
it('should send a new SubmissionPatchRequest', () => {
|
||||||
const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref, patchOpBody);
|
const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref + '?embed=item', patchOpBody);
|
||||||
scheduler.schedule(() => service.jsonPatchByResourceType(resourceEndpoint, resourceScope, testJsonPatchResourceType).subscribe());
|
scheduler.schedule(() => service.jsonPatchByResourceType(resourceEndpoint, resourceScope, testJsonPatchResourceType).subscribe());
|
||||||
scheduler.flush();
|
scheduler.flush();
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ describe('JsonPatchOperationsService test suite', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should send a new SubmissionPatchRequest', () => {
|
it('should send a new SubmissionPatchRequest', () => {
|
||||||
const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref, patchOpBody);
|
const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref + '?embed=item', patchOpBody);
|
||||||
scheduler.schedule(() => service.jsonPatchByResourceID(resourceEndpoint, resourceScope, testJsonPatchResourceType, testJsonPatchResourceId).subscribe());
|
scheduler.schedule(() => service.jsonPatchByResourceID(resourceEndpoint, resourceScope, testJsonPatchResourceType, testJsonPatchResourceId).subscribe());
|
||||||
scheduler.flush();
|
scheduler.flush();
|
||||||
|
|
||||||
|
@@ -37,6 +37,7 @@ import {
|
|||||||
} from './json-patch-operations.actions';
|
} from './json-patch-operations.actions';
|
||||||
import { JsonPatchOperationsResourceEntry } from './json-patch-operations.reducer';
|
import { JsonPatchOperationsResourceEntry } from './json-patch-operations.reducer';
|
||||||
import { jsonPatchOperationsByResourceType } from './selectors';
|
import { jsonPatchOperationsByResourceType } from './selectors';
|
||||||
|
import { URLCombiner } from '../url-combiner/url-combiner';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An abstract class that provides methods to make JSON Patch requests.
|
* An abstract class that provides methods to make JSON Patch requests.
|
||||||
@@ -144,7 +145,7 @@ export abstract class JsonPatchOperationsService<ResponseDefinitionDomain, Patch
|
|||||||
* instance of PatchRequestDefinition
|
* instance of PatchRequestDefinition
|
||||||
*/
|
*/
|
||||||
protected getRequestInstance(uuid: string, href: string, body?: any): PatchRequestDefinition {
|
protected getRequestInstance(uuid: string, href: string, body?: any): PatchRequestDefinition {
|
||||||
return new this.patchRequestConstructor(uuid, href, body);
|
return new this.patchRequestConstructor(uuid, new URLCombiner(href, '?embed=item').toString(), body);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected getEndpointByIDHref(endpoint, resourceID): string {
|
protected getEndpointByIDHref(endpoint, resourceID): string {
|
||||||
|
Reference in New Issue
Block a user