Use full projection for submission REST requests

This commit is contained in:
Chris Wilper
2020-02-20 13:59:36 -05:00
parent a04eb28815
commit 775dfb5f87
2 changed files with 3 additions and 2 deletions

View File

@@ -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() {

View File

@@ -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;
} }