Skip to content
Snippets Groups Projects
Unverified Commit a6f1a6d1 authored by Tim Donohue's avatar Tim Donohue Committed by GitHub
Browse files

Merge pull request #584 from atmire/SubmissionUseFullProjection

Use full projection for submission REST requests
parents e60688b8 775dfb5f
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ describe('SubmissionRestService test suite', () => { ...@@ -26,7 +26,7 @@ describe('SubmissionRestService test suite', () => {
const resourceEndpoint = 'workspaceitems'; const resourceEndpoint = 'workspaceitems';
const resourceScope = '260'; const resourceScope = '260';
const body = { test: new FormFieldMetadataValueObject('test')}; const body = { test: new FormFieldMetadataValueObject('test')};
const resourceHref = resourceEndpointURL + '/' + resourceEndpoint + '/' + resourceScope; const resourceHref = resourceEndpointURL + '/' + resourceEndpoint + '/' + resourceScope + '?projection=full';
const timestampResponse = 1545994811992; const timestampResponse = 1545994811992;
function initTestService() { function initTestService() {
......
...@@ -71,8 +71,9 @@ export class SubmissionRestService { ...@@ -71,8 +71,9 @@ export class SubmissionRestService {
*/ */
protected getEndpointByIDHref(endpoint, resourceID, collectionId?: string): string { protected getEndpointByIDHref(endpoint, resourceID, collectionId?: string): string {
let url = isNotEmpty(resourceID) ? `${endpoint}/${resourceID}` : `${endpoint}`; let url = isNotEmpty(resourceID) ? `${endpoint}/${resourceID}` : `${endpoint}`;
url = new URLCombiner(url, '?projection=full').toString();
if (collectionId) { if (collectionId) {
url = new URLCombiner(url, `?owningCollection=${collectionId}`).toString(); url = new URLCombiner(url, `&owningCollection=${collectionId}`).toString();
} }
return url; return url;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment