day-cohort-70 / rare-api-rare-bear-team-4

rare-api-rare-bear-team-4 created by GitHub Classroom
0 stars 0 forks source link

Feature/comment crud #94

Closed Marceline-G-S closed 4 months ago

Marceline-G-S commented 4 months ago

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