|
|
@ -1325,11 +1325,11 @@ exports.updateSensorQC = async (req, reply) => {
|
|
|
|
|
|
|
|
|
|
|
|
// Find the sensor by ID
|
|
|
|
// Find the sensor by ID
|
|
|
|
const updatedSensor = await Insensors.findOneAndUpdate(
|
|
|
|
const updatedSensor = await Insensors.findOneAndUpdate(
|
|
|
|
hardwareId,
|
|
|
|
{ hardwareId }, // correct query filter
|
|
|
|
filteredUpdateData,
|
|
|
|
filteredUpdateData,
|
|
|
|
{ new: true }
|
|
|
|
{ new: true }
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
if (!updatedSensor) {
|
|
|
|
if (!updatedSensor) {
|
|
|
|
return reply.code(409).send({ message: 'Sensor not found' });
|
|
|
|
return reply.code(409).send({ message: 'Sensor not found' });
|
|
|
|
}
|
|
|
|
}
|
|
|
|