To select all comments for a specific post, go to http://localhost:8088/comments
enter the object in body as a raw json in this format :
{
"post_id": 1
}
To update a comment, enter the object in body as a raw json in this format :
{
"author_id": 1,
"post_id": 1,
"content": "potatos"
}
Send request to update to http://localhost:8088/comments/[comment_id here]
To post a new comment, enter the object in body as a raw json in this format :
{
"author_id": 1,
"post_id": 1,
"content": "potatos"
}
Send request to post to http://localhost:8088/comments
Ticket:
80
What Changed:
Added CRUD. Post comment, select all comments, select comments by post, update comment, and delete comment now supported.
Testing Steps:
To select a comment, in postman go to http://localhost:8088/comments/[comment_id here]
To select all comments for a specific post, go to http://localhost:8088/comments enter the object in body as a raw json in this format : { "post_id": 1 }
To delete a comment, go to http://localhost:8088/comments/[comment_id here]
To update a comment, enter the object in body as a raw json in this format : { "author_id": 1, "post_id": 1, "content": "potatos" } Send request to update to http://localhost:8088/comments/[comment_id here]
To post a new comment, enter the object in body as a raw json in this format : { "author_id": 1, "post_id": 1, "content": "potatos" } Send request to post to http://localhost:8088/comments