From 11777a1aaaa81ee304f2152e2d7ea897fdb27397 Mon Sep 17 00:00:00 2001 From: varun Date: Thu, 4 Jan 2024 05:40:21 -0500 Subject: [PATCH] change in write motor statusac --- src/controllers/tanksController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 3adf6909..6aa55ec3 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -1515,7 +1515,7 @@ exports.writeMotorStatus = async (req, reply) => { // For example, update a database with the new status, current, and temp values let result; - + result = await Tank.findOneAndUpdate( { motor_id: motor_id }, { $set: { motor_status: status } } @@ -1544,7 +1544,7 @@ exports.changeMotorStatus = async (req, reply) => { - reply.send({ status_code: 200}); + reply.send({ status_code: 200,motor_status: action }); } catch (err) { throw boom.boomify(err); }