|
|
@ -1304,7 +1304,7 @@ exports.getiots = async (req, reply) => {
|
|
|
|
// Fetch data based on the query
|
|
|
|
// Fetch data based on the query
|
|
|
|
const result = await Insensors.find(query);
|
|
|
|
const result = await Insensors.find(query);
|
|
|
|
|
|
|
|
|
|
|
|
if (!result || result.length === 0) {
|
|
|
|
if (!result ) {
|
|
|
|
return reply.send({ status_code: 404, error: "not found" });
|
|
|
|
return reply.send({ status_code: 404, error: "not found" });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|