diff --git a/backend/applications/src/app.service.ts b/backend/applications/src/app.service.ts index 5743cb53..5147f468 100644 --- a/backend/applications/src/app.service.ts +++ b/backend/applications/src/app.service.ts @@ -7,7 +7,7 @@ export class AppService { return 'Hello World!'; } confirmFormSubmission(formRequest: Request): any { - console.log('testing form submit'); + return formRequest; } } diff --git a/backend/applications/src/app/services/form.service.ts b/backend/applications/src/app/services/form.service.ts index 56ecd4bf..53fff6d9 100644 --- a/backend/applications/src/app/services/form.service.ts +++ b/backend/applications/src/app/services/form.service.ts @@ -36,8 +36,7 @@ export class FormService { buildUpdateString = (pathText, newValue) => { const returnString = - 'jsonb_set("form_data"::jsonb,' + pathText + ',' + newValue + ')'; - console.log(returnString); + 'jsonb_set("form_data"::jsonb,' + pathText + ',' + newValue + ')'; return returnString; }; @@ -47,9 +46,7 @@ export class FormService { formId, submissionId, ) => { - console.log('partialUpdateObject', partialUpdateObject); - console.log('parentObjectNames', parentObjectNames); - + for (const property in partialUpdateObject) { if (typeof partialUpdateObject[property] === 'object') { this.processContent( @@ -67,14 +64,13 @@ export class FormService { } else { objectName = property; } - console.log('objectName', objectName); - console.log('objectName value', partialUpdateObject[property]); + const pathText = "'{" + objectName + "}'"; const newValue = '\'"' + partialUpdateObject[property] + '"\''; - console.log(pathText, newValue); + await this.formRepository .createQueryBuilder()