From bd50f4c8e645a39c2b2d6936e2ad0cc8132a623b Mon Sep 17 00:00:00 2001 From: bhaskar Date: Tue, 17 Oct 2023 14:44:03 +0530 Subject: [PATCH] read and write motor status --- src/controllers/tanksController.js | 3 ++- src/routes/tanksRoute.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 6fda48a7..c07bfa30 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -1619,4 +1619,5 @@ exports.writeMotorStatus = async (request, reply) => { request.log.error(error); return reply.code(500).send({ error: 'Internal Server Error' }); } -} \ No newline at end of file +} + diff --git a/src/routes/tanksRoute.js b/src/routes/tanksRoute.js index a0878b2d..ad6edc6c 100644 --- a/src/routes/tanksRoute.js +++ b/src/routes/tanksRoute.js @@ -752,6 +752,8 @@ module.exports = function (fastify, opts, next) { }, handler: tanksController.readMotorStatus }); + + next(); }