Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does the PR do?
This PR introduces new API endpoints to update comments. It includes server-side logic for handling comment update, along with appropriate validation and error handling.
How should this be manually tested?
To Update a Comment:
Send a PATCH request to /api/v1/comments/update/:comment_id with a valid UpdateCommentDto payload and a valid comment_id in the request.
Example:
PATCH /api/v1/comments/update/:comment_id
{
"content": "This is the update to the original comment"
}
Successful Response
On a successful comment update, the API should return a 200 SUCCESS status code.
Error Handling:
When the current user is not authourized:
When the current user is not found:
Error During coment update
If the comment creation is not successful:
Checklist of what has been done
API Test Screenshot
Jest Test Screenshot
Referenced Linear Ticket: Ticket-Link
Referenced Issue: Link to Issue