-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Labels
Description
Description
Users should be able to edit comments they have made.
Acceptance Criteria
A user can update their own comments.
Endpoint
PUT /edit/{commentId}
Payload
{
"commentId": "comment ID"
"userId": "[email protected]"
}
Response
{
"status": "200",
"message": "The account has been successfully edited.",
}
Proper authorization checks should be in place to prevent unauthorized editing.
Purpose
Allow users to manage their own content.
Requirements
Implement role-based access control (RBAC) to ensure only authorized users can edit comments.
Ensure database consistency and integrity after editing
Handle potential errors such as trying to edit a non-existent comment.
Provide a PUT API endpoint.
Expected Outcome
Users can edit their own comments.
Edit comments are either removed or replaced with a placeholder message.
Unauthorized users cannot edit comments.