diff --git a/src/controllers/installationController.js b/src/controllers/installationController.js index 4fc82a54..5097310d 100644 --- a/src/controllers/installationController.js +++ b/src/controllers/installationController.js @@ -10660,8 +10660,8 @@ exports.updateComments = async (req, reply) => { const { supportId } = req.params; const { comments, customerId, hardwareId, call_status, call_time } = req.body; - if (!supportId || !customerId || !hardwareId || !call_status || !call_time) { - return reply.code(400).send({ error: "supportId, customerId, hardwareId, call_status, and call_time are required" }); + if (!supportId || !customerId || !hardwareId ) { + return reply.code(400).send({ error: "supportId, customerId, hardwareId are required" }); } const trimmedComment = typeof comments === "string" ? comments.trim() : ""; diff --git a/src/routes/installationRoute.js b/src/routes/installationRoute.js index 6bb92cb4..b74faa88 100644 --- a/src/routes/installationRoute.js +++ b/src/routes/installationRoute.js @@ -593,13 +593,13 @@ module.exports = function (fastify, opts, next) { }, body: { type: "object", - required: ["customerId", "hardwareId", "comments", "call_status", "call_time"], + // required: ["customerId", "hardwareId", "comments", "call_status", "call_time"], properties: { - customerId: { type: "string", minLength: 1 }, - hardwareId: { type: "string", minLength: 1 }, - comments: { type: "string", minLength: 1 }, - call_status: { type: "string", minLength: 1 }, - call_time: { type: "string", minLength: 1 } + customerId: { type: "string"}, + hardwareId: { type: "string" }, + comments: { type: "string"}, + call_status: { type: "string"}, + call_time: { type: "string" } } } },