From d03c8cdd8970b4bb3234c4eeb7d434ff7f2cf8ed Mon Sep 17 00:00:00 2001 From: varun Date: Wed, 3 May 2023 06:45:01 -0400 Subject: [PATCH] made changes in tanks controller --- 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 4859a61a..8f397f23 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -163,7 +163,7 @@ exports.updateTanklevels = async (req, reply) => { // let waterLevel = parseInt(tank.waterlevel.replace(/,/g, ''), 10); const intervalId = setInterval(async function () { - let waterLevel = parseInt(tank.waterlevel.replace(/,/g, ''), 10); + const waterLevel = parseInt(tank.waterlevel.replace(/,/g, ''), 10); console.log(waterLevel) const motorStatus = tank.motor_status const newWaterLevel = Math.floor(waterLevel - 200);