From 0393a5cfd91531c04505f801a6e82d6343d82e45 Mon Sep 17 00:00:00 2001 From: varun Date: Fri, 10 May 2024 02:18:07 -0400 Subject: [PATCH] changes --- src/controllers/tanksController.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 874981d9..772a6dbc 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -188,14 +188,21 @@ exports.getConnectionsInfoOfParticularTank = async (req, reply) => { return reply.send({ status_code: 404, error: "Main tank not found" }); } - // Send the found tank - reply.send({ status_code: 200, data: mainTank }); + // Send the found tank within a list + const resultList = [{ + type: 'Main Tank', + message: 'This is the data of the main tank.', + details: mainTank + }]; + + reply.send({ status_code: 200, data: resultList }); } catch (err) { throw boom.boomify(err); } }; + //get tanks data by passing username exports.getTank = async (req, reply) => { try {