dshue20 / fbclone

Facebook clone
0 stars 0 forks source link

Backend Routes #3

Closed mashuDuek closed 4 years ago

mashuDuek commented 4 years ago
  1. You have a route to fetch a single post and I don't think having a post show page is within your MVPs, or even bonuses. This is the route I'm referring to: GET /api/posts/:id - returns a post
  2. The API endpoints for likes will need to change a bit once you make likes polymorphic, so it can handle liking comments and posts.
  3. In this route: PATCH /api/posts/:post_id/comments/:id - edits a comment, you have two wildcards. When really you only need the id of the comment you're going to be editing. So you can un-nest this route.
  4. In this route: DELETE /api/posts/:post_id/comments - deletes a comment, you have the post_id of the comment you want to delete, but not the id of the comment. Same as with above, I would un-nest the DELETE route.
  5. I don't see any routes to create friendships.