From 01157e24b356e83b1fa253469e9a94fa4b2affef Mon Sep 17 00:00:00 2001 From: Varun Date: Thu, 5 Sep 2024 16:03:08 +0530 Subject: [PATCH] get tank levels --- src/controllers/tanksController.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 661f9e9a..37dcdb74 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -384,16 +384,16 @@ exports.getTanklevels = async (req, reply) => { } // Summing up the total water levels and capacities - if (tank.tankLocation === 'sump' && tank.typeOfWater === 'Drinking Water') { + if (tank.tankLocation === 'sump' && tank.typeOfWater === 'drinking') { sumSumpDrinkingWater += waterlevel; sumSumpDrinkingWaterCapacity += capacity; - } else if (tank.tankLocation === 'overhead' && tank.typeOfWater === 'Drinking Water') { + } else if (tank.tankLocation === 'overhead' && tank.typeOfWater === 'drinking') { sumOverheadDrinkingWater += waterlevel; sumOverheadDrinkingWaterCapacity += capacity; - } else if (tank.tankLocation === 'sump' && tank.typeOfWater === 'Bore Water') { + } else if (tank.tankLocation === 'sump' && tank.typeOfWater === 'bore') { sumSumpBoreWater += waterlevel; sumSumpBoreWaterCapacity += capacity; - } else if (tank.tankLocation === 'overhead' && tank.typeOfWater === 'Bore Water') { + } else if (tank.tankLocation === 'overhead' && tank.typeOfWater === 'bore') { sumOverheadBoreWater += waterlevel; sumOverheadBoreWaterCapacity += capacity; }