refactor(task-comments): update response structure for comment data
This commit is contained in:
@@ -237,8 +237,8 @@ export default class TaskCommentsController extends WorklenzControllerBase {
|
|||||||
size: att.size
|
size: att.size
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Transform the response to match the desired format
|
|
||||||
const commentResponse = {
|
const commentdata = {
|
||||||
attachments: commentAttachments,
|
attachments: commentAttachments,
|
||||||
avatar_url: avatarUrl,
|
avatar_url: avatarUrl,
|
||||||
content: req.body.content,
|
content: req.body.content,
|
||||||
@@ -253,7 +253,7 @@ export default class TaskCommentsController extends WorklenzControllerBase {
|
|||||||
user_id: req.user?.id || ""
|
user_id: req.user?.id || ""
|
||||||
};
|
};
|
||||||
|
|
||||||
return res.status(200).send(new ServerResponse(true, commentResponse));
|
return res.status(200).send(new ServerResponse(true, commentdata));
|
||||||
}
|
}
|
||||||
|
|
||||||
@HandleExceptions()
|
@HandleExceptions()
|
||||||
|
|||||||
Reference in New Issue
Block a user