Skip to content

Backend Routes

Amanda Mitchell edited this page Oct 9, 2018 · 3 revisions

Backend Routes


HTML

  • GET / StaticPagesController#root

API Endpoints


users

  • GET /api/users - allows users to search for other users to add as friends

  • GET /api/users/:id - allows user to view their private dashboard

  • POST /api/users - allows users to sign up

session

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

routes

  • GET /api/routes - shows list of routes
  • GET /api/routes/:id - shows a route
  • POST /api/routes - creates a routes
  • PATCH /api/routes/:id - edits a routes
  • DELETE /api/routes/:id - removes a routes

comments

  • POST /api/routes/:route_id/comments - comment on a route
  • DELETE /api/routes/:route_id/comments - delete a comment

friend

  • GET /api/users/:user_id/friends - shows list of a user's friends
  • POST /api/users/:user_id/friends - user can add a friend
  • DELETE /api/users/:user_id/friends - user can delete a friend

Clone this wiki locally