From f87fba96d8fd9281517d1008d35733682b0dd4f4 Mon Sep 17 00:00:00 2001 From: shancds Date: Tue, 5 Aug 2025 09:20:14 +0530 Subject: [PATCH] refactor(task-comments): update response structure for comment data --- .../src/controllers/task-comments-controller.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worklenz-backend/src/controllers/task-comments-controller.ts b/worklenz-backend/src/controllers/task-comments-controller.ts index 347ca7da..619d6310 100644 --- a/worklenz-backend/src/controllers/task-comments-controller.ts +++ b/worklenz-backend/src/controllers/task-comments-controller.ts @@ -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()