Skip to content

[Feat] User can update their respective comment #685

@Ajiboye-01

Description

@Ajiboye-01

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions