|
|
|
@ -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 {
|
|
|
|
|