Skip to content

Conversation

RandomProgramm3r
Copy link
Owner

Introduce a complete comment management system for promo.

This change introduces a new PromoComment model and a set of API endpoints for full CRUD (Create, Read, Update, Delete) functionality.

New Endpoints:

  • POST /user/promo/{id}/comments: Create a new comment on a promo.
  • GET /user/promo/{id}/comments: List all comments for a promo with limit/offset pagination and an X-Total-Count header.
  • GET /user/promo/{id}/comments/{comment_id}: Retrieve a single comment by its ID.
  • PUT /user/promo/{id}/comments/{comment_id}: Update an existing comment. This action is restricted to the comment's author.
  • DELETE /user/promo/{id}/comments/{comment_id}: Delete a comment. Also restricted to the author.

Related Changes:

  • To support the new functionality, the Promo model has been updated with a comment_count field.

Introduce a complete comment management system for promo.

This change introduces a new `PromoComment` model and a set of API endpoints for full CRUD (Create, Read, Update, Delete) functionality.

New Endpoints:
- `POST /user/promo/{id}/comments`: Create a new comment on a promo.
- `GET /user/promo/{id}/comments`: List all comments for a promo with limit/offset pagination and an `X-Total-Count` header.
- `GET /user/promo/{id}/comments/{comment_id}`: Retrieve a single comment by its ID.
- `PUT /user/promo/{id}/comments/{comment_id}`: Update an existing comment. This action is restricted to the comment's author.
- `DELETE /user/promo/{id}/comments/{comment_id}`: Delete a comment. Also restricted to the author.

Related Changes:
- To support the new functionality, the `Promo` model has been updated with a `comment_count` field.
@RandomProgramm3r RandomProgramm3r merged commit 0c952cc into main Jun 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant