|
|
@ -982,7 +982,6 @@ exports.IotDevice = async (req, reply) => {
|
|
|
|
|
|
|
|
|
|
|
|
// save the document to MongoDB
|
|
|
|
// save the document to MongoDB
|
|
|
|
await ottank.save();
|
|
|
|
await ottank.save();
|
|
|
|
|
|
|
|
|
|
|
|
// get the latest document sorted in descending order of date and time
|
|
|
|
// get the latest document sorted in descending order of date and time
|
|
|
|
const latestOttank = await IotData.findOne({ hardwareId }).sort({ date: -1, time: -1 });
|
|
|
|
const latestOttank = await IotData.findOne({ hardwareId }).sort({ date: -1, time: -1 });
|
|
|
|
|
|
|
|
|
|
|
|