From bf1568c7d44b56fecf163a922001ab42a1a03ee3 Mon Sep 17 00:00:00 2001 From: Varun Date: Thu, 30 Jan 2025 11:59:32 +0530 Subject: [PATCH] changes --- src/controllers/tanksController.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 38620081..6d597a98 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -5374,11 +5374,9 @@ exports.update_auto_percentage = async (req, reply) => { console.log("Update result:", result); - if (result.modifiedCount > 0) { + reply.send({ status_code: 200, message: "Auto mode and percentages updated successfully." }); - } else { - reply.send({ status_code: 400, message: "Values were already up-to-date." }); - } + } catch (error) { console.error(error); reply.send({ status_code: 500, message: "Internal server error." });