comments time

master^2
Bhaskar 4 months ago
parent 669513284e
commit 164580169f

@ -5259,9 +5259,17 @@ exports.getDisconnectedIssuesBySupportId = async (req, reply) => {
} }
} }
const commentTexts = (supportRecord.comments || []).map(c => c.text); // const commentTexts = (supportRecord.comments || []).map(c => c.text);
// for (const master of Object.values(masterMap)) {
// master.comments = commentTexts;
// }
const comments = (supportRecord.comments || []).map(c => ({
text: c.text,
commentsTime: moment(c.createdAt).tz("Asia/Kolkata").format("DD-MM-YYYY HH:mm")
}));
for (const master of Object.values(masterMap)) { for (const master of Object.values(masterMap)) {
master.comments = commentTexts; master.comments = comments;
} }
return reply.send({ return reply.send({

Loading…
Cancel
Save