From 5bc4851e3cc344e034bfcd6b753e04a623356d7a Mon Sep 17 00:00:00 2001 From: Bhaskar Date: Mon, 19 May 2025 18:03:19 +0530 Subject: [PATCH] changes --- src/controllers/installationController.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/controllers/installationController.js b/src/controllers/installationController.js index 9947bdf7..61c4609e 100644 --- a/src/controllers/installationController.js +++ b/src/controllers/installationController.js @@ -1862,7 +1862,14 @@ exports.getMasterSlaveSummary = async (req, reply) => { } } } + const matchedTankDetails = await Tank.findOne({ + customerId, + tankhardwareId: slave.tankhardwareId, + }).lean(); + if (matchedTankDetails?.typeOfWater) { + typeOfWater = matchedTankDetails.typeOfWater; + } // Update DB with new status and timestamps await Insensors.updateOne( { hardwareId: slave.hardwareId }, @@ -1888,6 +1895,7 @@ exports.getMasterSlaveSummary = async (req, reply) => { lora_last_check_time: loraLastCheckTime, lora_last_disconnect_time: loraLastDisconnect, type: slave.type || "slave", + typeOfWater, connected_to: slave.connected_to || null, }); }