From 5bba3572c254791c1f68c831028f3b56fc3019f2 Mon Sep 17 00:00:00 2001 From: lmd59 Date: Wed, 31 Jul 2024 17:28:39 -0400 Subject: [PATCH] Apply suggestions from code review Typo and remove unnecessary parameter Co-authored-by: Elsa Perelli --- src/services/export.service.js | 2 +- src/util/mongo.controller.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/export.service.js b/src/services/export.service.js index 5995951..ae606db 100644 --- a/src/services/export.service.js +++ b/src/services/export.service.js @@ -31,7 +31,7 @@ const bulkExport = async (request, reply) => { } if (validateExportParams(parameters, reply)) { request.log.info('Base >>> $export'); - const clientEntry = await addPendingBulkExportRequest(parameters._bySubject === 'Patient'); + const clientEntry = await addPendingBulkExportRequest(); const types = request.query._type?.split(',') || parameters._type?.split(','); //TODO, does gatherParams not pull from the query as well? Why is this OR required? diff --git a/src/util/mongo.controller.js b/src/util/mongo.controller.js index 103ec4a..c6459a4 100644 --- a/src/util/mongo.controller.js +++ b/src/util/mongo.controller.js @@ -109,7 +109,7 @@ const findResourcesWithAggregation = async (query, resourceType, options = {}) = /** * Called as a result of export request. Adds a new clientId to db * which can be queried to get updates on the status of the bulk export - * @param {boolean} byPatient indicated whether this export request groups data by patient (versus by type) + * @param {boolean} byPatient indicates whether this export request groups data by patient (versus by type) * @returns the id of the inserted client */ const addPendingBulkExportRequest = async (byPatient = false) => {