Closed samsmithKruz closed 2 weeks ago
Comments are to be generic and attachable to any model
Alright sir, I've updated the schema such that comments are now generic, the model or schema to which the comment is made will be passed in the "Request Body" as model_name
@highb33kay @Ameenah-Ameenah @highb33kay @prondubuisi
Please approve this ticket. Thank you
Description
Implement a feature that allows users to add comments to individual posts.
Acceptance Criteria
Database Schema
API Endpoints
/api/v1/comments/add
.Validation Rules
item_id
,model_name
,comment
.comment
should be a non-empty string.item_id
andmodel_name
should be valid IDs and model name (table) referencing existing contents and users.Database Storage
Error Handling
Request Header
Request Body
Successful Response (status code: 201)
Error Response
Purpose
To enhance user engagement by allowing interaction through comments.
Requirements
Expected Outcome
Testing
Checklist