From 8524927cc6cbd2d8c91f5df1fdce64460d823d83 Mon Sep 17 00:00:00 2001 From: Varun Date: Tue, 17 Dec 2024 17:44:11 +0530 Subject: [PATCH] changes --- src/controllers/tanksController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 61b3339b..10e1839d 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -2130,7 +2130,7 @@ else if (currentWaterLevel >= highWaterThreshold) { const currentWaterLevel = parseInt(supplierTank.waterlevel, 10); const currentWaterPercentage = (currentWaterLevel / parseInt(supplierTank.capacity.replace(/,/g, ''), 10)) * 100; const receiverTank1 = await Tank.findOne({ customerId, tankName: req.body.to, tankLocation: req.body.to_type.toLowerCase() }); - const stop_threshold_time = receiverTank1.connections.inputConnections[inputConnectionIndex].stop_threshold_time + const stop_threshold_time = receiverTank1.connections.inputConnections[stop_threshold_time] if (moment().isSameOrAfter(stop_threshold_time) || currentWaterPercentage <= lowWaterThreshold) { console.log(thresholdTime,"thresholdtime") console.log(new Date(),"new time")