Skip to content

Backend

AAfghahi edited this page Sep 21, 2020 · 4 revisions

HTML


  • GET/ StaticPagesController#root

API Endpoints


users

  • GET /api/users - Finds the user, and returns their routes, workouts, and has a user search feature
  • POST /api/users - Lets a new user sign up

session

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

routes

  • GET /api/routes - returns routes that a user has
  • GET /api/routes/:id - returns a specific route
  • POST /api/routes - creates a route
  • PATCH /api/routes/:id - edit a route
  • DELETE /api/routes/:id - delete a route

workouts

  • GET /api/workouts - gets all the workouts associated with a user.
  • GET /api/workouts/:id - finds a specific workout.
  • POST /api/workouts - create a new workout
  • PATCH /api/workout/:id - edit a workout
  • DELETE /api/workouts/:id - delete a workout

workout_comments

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