made changes in tanks controller

master
varun 2 years ago
parent c808196bb0
commit b76437b5d7

@ -160,9 +160,10 @@ exports.updateTanklevels = async (req, reply) => {
const tankId = tank._id; const tankId = tank._id;
const tank_name = tank.tankName const tank_name = tank.tankName
let capacity = parseInt(tank.capacity.replace(/,/g, ''), 10); let capacity = parseInt(tank.capacity.replace(/,/g, ''), 10);
let waterLevel = parseInt(tank.waterlevel.replace(/,/g, ''), 10); // let waterLevel = parseInt(tank.waterlevel.replace(/,/g, ''), 10);
const intervalId = setInterval(async function () { const intervalId = setInterval(async function () {
let waterLevel = parseInt(tank.waterlevel.replace(/,/g, ''), 10);
const newWaterLevel = Math.floor(waterLevel - 200); const newWaterLevel = Math.floor(waterLevel - 200);

Loading…
Cancel
Save