From 470cfb42923f74baf4083668f200a055b038f6dc Mon Sep 17 00:00:00 2001 From: varun Date: Wed, 10 Jul 2024 07:07:39 -0400 Subject: [PATCH] changes in tank levelsvarun --- src/controllers/tanksController.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 8f51a80e..cfcd6dcc 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -317,9 +317,6 @@ exports.getTanklevels = async (req, reply) => { const updated_data = await Tank.find({ customerId: customerId }); console.log("updated_data", updated_data); - const user = await User.findOne({ customerId: customerId }); - const buildingName = user ? user.buildingName : null; - const address1 = user ? user.profile.address1 : null; updated_data.forEach((tank) => { const waterlevel = parseInt(tank.waterlevel.replace(/,/g, ''), 10); @@ -353,8 +350,6 @@ exports.getTanklevels = async (req, reply) => { totalDrinkingWaterInOverheadCapacity: sumOverheadDrinkingWaterCapacity, totalBoreWaterInSumpCapacity: sumSumpBoreWaterCapacity, totalBoreWaterInOverheadCapacity: sumOverheadBoreWaterCapacity, - buildingName: buildingName, - address1: address1, }; if (!reply.sent) { @@ -370,6 +365,7 @@ exports.getTanklevels = async (req, reply) => { }; + const intervals = {}; let sump_water_levels=[]; let supplier_tanks = [];