Skip to content
trwong edited this page Nov 20, 2017 · 8 revisions

HTML

  • GET / StaticPagesController#root

API Endpoints

Users

  • GET /api/users - returns the user information for the User Search feature (bonus feature)
  • POST /api/users - sign up

Posts

  • GET /api/posts - returns relevant posts (filtered by data / params)
  • GET /api/posts/:id - returns post
  • POST /api/posts - creates a post
  • PATCH /api/posts/:id - edits a post
  • DELETE /api/posts/:id - delete post

Comments

  • GET /api/posts/:id/comments - returns all comments on parent post
  • GET /api/posts/:id/comments/:id - return comment
  • POST /api/posts/:id/comments - creates a comment
  • PATCH /api/posts/:id/comments/:id - edits a post
  • DELETE /api/posts/:id/comments/:id - delete post

Likes

  • POST /api/likes - like a post or comment
  • DELETE /api/likes - unlike a post or comment

Front End Routes

  • /login
  • /feed - News feed, home page
  • /feed/new - Create new post
  • /feed/:postId - View individual post
  • /feed/:postId/edit - Edit own post
  • /feed/:postId/new - Create new comment on post
  • /users/:userId - Profile pages
  • /users/:userId/new - Create new post on user's profile
  • /users/:userId/:postId - View individual post on profile
  • /users/:userId/:postId/edit - Edit post on own profile
  • /users/:userId/:postId/new - Create new comment on post on profile

Clone this wiki locally