From 1805040f931e1fbe3a27f72987dbeb4ff17d0dda Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Thu, 28 Sep 2023 22:06:50 +0100 Subject: [PATCH] Run Prettier Signed-off-by: Fred Boniface --- src/services/dbAccess.services.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/services/dbAccess.services.js b/src/services/dbAccess.services.js index ea6d5dd..822ca3a 100644 --- a/src/services/dbAccess.services.js +++ b/src/services/dbAccess.services.js @@ -14,9 +14,7 @@ const db = client.db(dbName); async function query(collection, query, returnId = false) { await client.connect(); - logger.trace( - `dbAccess.query: Connecting to collection: '${collection}'` - ); + logger.trace(`dbAccess.query: Connecting to collection: '${collection}'`); var qcoll = db.collection(collection); var qcursor = qcoll.find(query); if (!returnId) { @@ -34,7 +32,10 @@ async function queryProject(collection, query, projection) { logger.debug(`dbAccess.queryProject: Connecting to col: '${collection}'`); const qcoll = db.collection(collection); const qcursor = qcoll.find(query).project(projection); - logger.debug(projection, `dbAccess.query: Running Query: ${JSON.stringify(query)}`) + logger.debug( + projection, + `dbAccess.query: Running Query: ${JSON.stringify(query)}` + ); increment(collection); return await qcursor.toArray(); } @@ -48,9 +49,7 @@ async function queryAggregate(collection, pipeline) { } async function increment(target) { - logger.debug( - `dbAccess.increment: Incrementing counter for: ${target}` - ); + logger.debug(`dbAccess.increment: Incrementing counter for: ${target}`); await client.connect(); let col = db.collection("meta"); let update = {}; @@ -102,7 +101,9 @@ async function delRegReq(uuid) { } async function colCount(collection) { - logger.debug(`dbAccess.colCount: Counting entries in collection: ${collection}`); + logger.debug( + `dbAccess.colCount: Counting entries in collection: ${collection}` + ); await client.connect(); let col = db.collection(collection); let count = col.countDocuments();