Skip to content

Backend routes

Sam O'Donnell edited this page Feb 26, 2019 · 5 revisions

HTML

  • GET / StaticPagesController#root

API Endpoints

users

  • GET /api/users/:user_id - returns user's profile page
  • POST /api/users - signup

session

  • POST /api/session - login
  • DELETE /api/session - logout

stories

  • GET /api/stories - returns relevant stories (filtered by params)
  • GET /api/stories/:id - returns a story
  • POST /api/stories - adds story
  • PATCH /api/stories/:id - edits story
  • DELETE /api/stories/:id - deletes story

comments

  • POST /api/comments - adds new comment
  • PATCH /api/comments/:id - edits comment
  • DELETE /api/comments - deletes comment
Clone this wiki locally