Comment - OgnianApostolov/builderly-api-docs GitHub Wiki
Model
Comment comment{
"_id": {
"autogenerated": "true"
},
"user": {
"ref": "User._ObjectId",
"required": "true"
},
"commented_on": {
"type": "Commented_On._ObjectId",
"required": "true"
},
"comment": {
"type": "string",
"required": "true"
},
"replies": [
{
"comment": {
"type": "string",
"required": "true"
},
"user": {
"ref": "User._ObjectId",
"required": "true"
}
}
],
"createdAt": {
"autogenerated": "true"
},
"updatedAt": {
"autogenerated": "true"
}
}
GET /comment - Retrieves a list of comments
Success - 200
Error - 400
POST /comment - Creates a new comment
Success - 201
Error - 400
GET /comment/id - Retrieves a specific comment by ID
Success - 200
Error - 404
PATCH /comment/id - Updates a specific comment by ID
Success - 200
Error - 404
DELETE /comment/id - Deletes a specific comment by ID
Success - 200
Error - 404