diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index fe512dbe..bb76689e 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -1749,7 +1749,8 @@ exports.IotDevice = async (req, reply) => { const tank_height = parseInt(tank_height1.toFixed(0), 10); // Ensure it's an integer const water_level_height = tank_height - tankHeight; const waterCapacityPerCm = parseInt(existingTank.waterCapacityPerCm.replace(/,/g, ''), 10); - const water_level = water_level_height * waterCapacityPerCm; + + const water_level = parseInt(water_level_height * waterCapacityPerCm, 10); if (water_level >= 0) { existingTank.waterlevel = water_level; diff --git a/src/routes/tankersRoute.js b/src/routes/tankersRoute.js index 1c7694ee..9640dbf5 100644 --- a/src/routes/tankersRoute.js +++ b/src/routes/tankersRoute.js @@ -271,7 +271,7 @@ module.exports = function (fastify, opts, next) { method: "POST", url: "/api/addBores/:InstallerId", schema: { - tags: ["Tank"], + tags: ["Install"], description: "This is to cretae New Bore", summary: "This is to Create New Bore.", params: { @@ -386,7 +386,7 @@ module.exports = function (fastify, opts, next) { fastify.get("/api/getBoresbyInstaller", { schema: { - tags: ["Tank"], + tags: ["Install"], description: "This is for Get Bore Data of Installer", summary: "This is for to Get Bore Data of installer", querystring: { diff --git a/src/routes/tanksRoute.js b/src/routes/tanksRoute.js index 368bc6d2..12293367 100644 --- a/src/routes/tanksRoute.js +++ b/src/routes/tanksRoute.js @@ -8,7 +8,7 @@ module.exports = function (fastify, opts, next) { method: "POST", url: "/api/addTanks/:InstallerId", schema: { - tags: ["Tank"], + tags: ["Install"], description: "This is for cretae New Tank", summary: "This is for Create New Tank.", params: { @@ -55,7 +55,7 @@ module.exports = function (fastify, opts, next) { method: "PUT", url: "/api/updateTanks/:InstallerId", schema: { - tags: ["Tank"], + tags: ["Install"], summary: "This is for update tank", params: { required: ["InstallerId"], @@ -103,7 +103,7 @@ module.exports = function (fastify, opts, next) { method: "PUT", url: "/api/deleteTank/:InstallerId", schema: { - tags: ["Tank"], + tags: ["Install"], summary: "This is for delete tank", params: { required: ["InstallerId"], @@ -199,7 +199,7 @@ module.exports = function (fastify, opts, next) { fastify.get("/api/getTanksofParticularInstaller", { schema: { - tags: ["Tank"], + tags: ["Install"], description: "This is to Get Tank Data of Installer", summary: "This is to Get Tank Data of Installer",