Skip to content

Backend Routes

gty3310 edited this page Aug 8, 2018 · 2 revisions

Backend Routes

HTML

  • GET / StaticPagesController#root

API Endpoints

users

  • GET api/users - returns info for the user search feature
  • POST api/users - signup

session

  • POST /api/session - log in
  • DELETE /api/session - log out

posts

  • GET api/posts - get all posts
  • GET api/posts/:id - get single post
  • POST api/posts - create a new post
  • DELETE api/posts/:id - delete a post
  • PATCH api/posts/:id - update a post

comments

  • POST api/comments - create a new comment
  • DELETE api/comments/:id - delete a comment
  • PATCH api/comments/:id - update a comment
Clone this wiki locally