From 3a8723c65adace9ef385a62c725541fbe13f6a53 Mon Sep 17 00:00:00 2001 From: Han Date: Thu, 6 Jun 2024 17:22:17 +0100 Subject: [PATCH] add some extra debug logs --- src/controllers/v1/services/index.js | 1 + src/controllers/v1/services/routes/get-service.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/controllers/v1/services/index.js b/src/controllers/v1/services/index.js index 140f086..face48e 100644 --- a/src/controllers/v1/services/index.js +++ b/src/controllers/v1/services/index.js @@ -73,6 +73,7 @@ module.exports = { */ show: async (req, res, next) => { try { + logger.info(req.params) const query = getService.buildQuery(req.params) const result = await getService.executeQuery(query) // let result = await db() diff --git a/src/controllers/v1/services/routes/get-service.js b/src/controllers/v1/services/routes/get-service.js index 8211ac2..f68b1a8 100644 --- a/src/controllers/v1/services/routes/get-service.js +++ b/src/controllers/v1/services/routes/get-service.js @@ -1,6 +1,7 @@ const filters = require("../../../../lib/filters") const { projection } = require("../../../../lib") const { db } = require("../../../../db") +const logger = require("../../../../../utils/logger") module.exports = { /** @@ -24,6 +25,10 @@ module.exports = { * @returns */ async executeQuery(query) { + logger.debug("query") + logger.debug(query) + logger.debug(JSON.stringify(query)) + let result = await db() .collection("indexed_services") .findOne(query, projection)