@ -1026,6 +1026,7 @@ exports.IotDevice = async (req, reply) => {
// }
exports.getIotD = async (req, reply) => {
try {
const latestRecords = await IotData.find({ hardwareId: req.query.hardwareId })
@ -383,6 +383,7 @@ module.exports = function (fastify, opts, next) {
},
],
//preHandler: fastify.auth([fastify.authenticate]),
handler: tanksController.getIotD,
});