@ -982,7 +982,6 @@ exports.IotDevice = async (req, reply) => {
// save the document to MongoDB
await ottank.save();
// get the latest document sorted in descending order of date and time
const latestOttank = await IotData.findOne({ hardwareId }).sort({ date: -1, time: -1 });
@ -355,6 +355,7 @@ module.exports = function (fastify, opts, next) {
}
},
required: ["hardwareId", "mode", "tanks"]
security: [