Skip to content

backend routes

Kevin Chen edited this page Mar 19, 2022 · 5 revisions

Backend Routes

HTML

  • GET / - StaticPagesController#root

API Endpoints

users

  • GET /api/users - returns the user information of displayed posts and for the User Search feature
  • POST /api/users - sign up

session

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

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 - edit a post
  • DELETE /api/posts/:id - remove a post

follows

  • POST /api/follows - follow a post
  • DELETE /api/follows/:id - unfollow a post
Clone this wiki locally