@ -1234,6 +1234,7 @@ exports.deleteSensorById = async (req, reply) => {
}
};
exports.updateSensorQC = async (req, reply) => {
try {
const { _id } = req.params;
@ -1269,6 +1270,7 @@ exports.updateSensorQC = async (req, reply) => {
exports.getSensorsByStatus = async (req, reply) => {
const { storeId } = req.params;
@ -271,7 +271,6 @@ const insensorsSchema = new mongoose.Schema({
batchno: { type: String, default: null },
sensor_type: { type: String, enum: ['slaves', 'motorswitch', 'master'] }, // adding sensor_type field
status: { type: String, default: "pending" },
});
@ -1188,6 +1188,7 @@ fastify.post("/api/updateSensorQC/:_id", {
handler: storeController.updateSensorQC,
fastify.get("/api/getSensorsByStatus/:storeId", {
schema: {
description: "Get list of sensors grouped by status for a given store",