Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] User can update their respective comment #685

Open
Ajiboye-01 opened this issue Feb 27, 2025 · 0 comments
Open

[Feat] User can update their respective comment #685

Ajiboye-01 opened this issue Feb 27, 2025 · 0 comments
Assignees
Labels

Comments

@Ajiboye-01
Copy link

Ajiboye-01 commented Feb 27, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants