refactor(task-comments): update response structure for comment data

This commit is contained in:
shancds
2025-08-05 09:20:14 +05:30
parent 81d5c8559c
commit f87fba96d8

View File

@@ -237,8 +237,8 @@ export default class TaskCommentsController extends WorklenzControllerBase {
size: att.size
}));
// Transform the response to match the desired format
const commentResponse = {
const commentdata = {
attachments: commentAttachments,
avatar_url: avatarUrl,
content: req.body.content,
@@ -253,7 +253,7 @@ export default class TaskCommentsController extends WorklenzControllerBase {
user_id: req.user?.id || ""
};
return res.status(200).send(new ServerResponse(true, commentResponse));
return res.status(200).send(new ServerResponse(true, commentdata));
}
@HandleExceptions()