master^2
Bhaskar 3 months ago
parent 575492dca0
commit d05747e63d

@ -10660,8 +10660,8 @@ exports.updateComments = async (req, reply) => {
const { supportId } = req.params; const { supportId } = req.params;
const { comments, customerId, hardwareId, call_status, call_time } = req.body; const { comments, customerId, hardwareId, call_status, call_time } = req.body;
if (!supportId || !customerId || !hardwareId || !call_status || !call_time) { if (!supportId || !customerId || !hardwareId ) {
return reply.code(400).send({ error: "supportId, customerId, hardwareId, call_status, and call_time are required" }); return reply.code(400).send({ error: "supportId, customerId, hardwareId are required" });
} }
const trimmedComment = typeof comments === "string" ? comments.trim() : ""; const trimmedComment = typeof comments === "string" ? comments.trim() : "";

@ -593,13 +593,13 @@ module.exports = function (fastify, opts, next) {
}, },
body: { body: {
type: "object", type: "object",
required: ["customerId", "hardwareId", "comments", "call_status", "call_time"], // required: ["customerId", "hardwareId", "comments", "call_status", "call_time"],
properties: { properties: {
customerId: { type: "string", minLength: 1 }, customerId: { type: "string"},
hardwareId: { type: "string", minLength: 1 }, hardwareId: { type: "string" },
comments: { type: "string", minLength: 1 }, comments: { type: "string"},
call_status: { type: "string", minLength: 1 }, call_status: { type: "string"},
call_time: { type: "string", minLength: 1 } call_time: { type: "string" }
} }
} }
}, },

Loading…
Cancel
Save