Skip to content

Backend Routes

Jose edited this page Jan 19, 2021 · 2 revisions

HTML

  • GET / StaticPagesController#root

API Endpoints

users

  • GET /api/users - Serchable list of users.
  • POST /api/users - Creates an account.

session

  • POST /api/session - Logs in the user.
  • DELETE /api/session - Logs the user out.

routes

  • GET /api/users/:id/routes - Shows the routes for a specific user.
  • GET /api/routes/:id - shows a specific route.
  • POST /api/routes - Stores a route into the db.
  • PATCH /api/routes/:id
  • DELETE /api/routes/:id

friendships

  • GET /api/users/:id/friends
  • POST /api/friendships/ - creates a friend request
  • PATCH /api/friendships/:id - used to accept friend requests.
  • DELETE /api/friendships/:id - denies or cancels a friend request by deleting it.

comments

  • GET /api/routes/:id/comments
  • GET /api/users/:id/comments
  • GET /api/routes/:id/comments
  • POST /api/comments - Creates a comment.
  • DELETE /api/comments/:id - Deletes a comment.

cheers

  • POST /api/comments - Creates a cheer.
  • DELETE /api/comments - Deletes a cheer.
Clone this wiki locally