made changes in iot create data

master
varun 2 years ago
parent c23bcb9495
commit 74c5202f9d

@ -1026,6 +1026,7 @@ exports.IotDevice = async (req, reply) => {
// } // }
// } // }
exports.getIotD = async (req, reply) => { exports.getIotD = async (req, reply) => {
try { try {
const latestRecords = await IotData.find({ hardwareId: req.query.hardwareId }) const latestRecords = await IotData.find({ hardwareId: req.query.hardwareId })

@ -383,6 +383,7 @@ module.exports = function (fastify, opts, next) {
}, },
], ],
}, },
//preHandler: fastify.auth([fastify.authenticate]), //preHandler: fastify.auth([fastify.authenticate]),
handler: tanksController.getIotD, handler: tanksController.getIotD,
}); });

Loading…
Cancel
Save