description added in insensors/media

master^2
Bhaskar 2 weeks ago
parent f9ea6a414e
commit d945c74786

@ -1969,7 +1969,7 @@ exports.addMediaToInsensor = async (req, reply) => {
// const { hardwareId, customerId, type } = req.params;
// const { video, material, workStatus, product_status } = req.body;
const { customerId } = req.params;
const { hardwareId, type, video, material, workStatus, product_status } = req.body;
const { hardwareId, type, video, material, workStatus, product_status,description } = req.body;
if (!hardwareId || !customerId || !type) {
@ -2001,6 +2001,9 @@ exports.addMediaToInsensor = async (req, reply) => {
if (product_status && ['pending', 'complete'].includes(product_status)) {
insensor.product_status = product_status;
}
if (description) {
insensor.description = description;
}
await insensor.save();

@ -792,6 +792,8 @@ workStatusPictures: [
enum: ['pending', 'complete'],
default: 'pending'
},
description: { type: String },
});

@ -629,7 +629,9 @@ fastify.post(
type: 'string',
enum: ['pending', 'complete'],
description: 'Optional: update product_status'
}
},
description: { type: 'string' },
},
// at least one of video, material, workStatus required

Loading…
Cancel
Save