master^2
Bhaskar 5 months ago
parent da3dc19cd9
commit 6eca8f7a89

@ -6228,8 +6228,8 @@ exports.StatusTeamMember = async (request, reply) => {
exports.updateComments = async (req, reply) => {
try {
const { supportId, customerId, hardwareId } = req.params;
const { comments } = req.body;
const { supportId} = req.params;
const { comments, customerId, hardwareId } = req.body;
if (!supportId || !customerId || !hardwareId) {
return reply.code(400).send({ error: "supportId, customerId and hardwareId are required in path params" });

@ -562,7 +562,7 @@ module.exports = function (fastify, opts, next) {
},
handler: installationController.getDisconnectedIssuesBySupportId,
});
fastify.put('/api/updateComments/:supportId/:customerId/:hardwareId', {
fastify.put('/api/updateComments/:supportId', {
schema: {
description: "Update comments for a support record issue",
tags: ["Support"],
@ -571,14 +571,15 @@ module.exports = function (fastify, opts, next) {
required: ["supportId", "customerId", "hardwareId"],
properties: {
supportId: { type: "string", minLength: 1 },
customerId: { type: "string", minLength: 1 },
hardwareId: { type: "string", minLength: 1 }
}
},
body: {
type: "object",
required: ["comments"],
properties: {
customerId: { type: "string", minLength: 1 },
hardwareId: { type: "string", minLength: 1 },
comments: { type: "string", minLength: 1 }
}
},

Loading…
Cancel
Save