Backend Routes - Atar97/FSP GitHub Wiki
HTML
GET /StaticPagesController#root
API Endpoints
users
POST /api/users
GET /api/users/:id
get all the info for a certain user
GET /api/users
get the lname, fname for all users in the db
session
POST /api/session
-login
DELETE /api/session
-logout
routes
GET /api/routes
-all routes for route index page
GET /api/routes/my_routes
-all routes for the current user
GET /api/routes/:id
-route show page
POST /api/routes
-create a route
DELETE /api/routes/:id
-delete a route
PATCH /api/routes/:id
-update a route
workouts
GET /api/:user_id/workouts
-all workouts for route index page
GET /api/workouts/:id
-workout show page
POST /api/:user_id/workouts
-create a workout
DELETE /api/workouts/:id
-delete a workout
PATCH /api/workouts/:id
-update a workout
friends
GET /api/:user_id/friends/
-grab all the friends
POST /api/:user_id/friends
-create a new friend connection
DELETE /api/friends/:id
-delete a friend connection
comments
GET /api/:commentable_id/comments/
-grab all the comments for a route or workout
POST /api/:commentable_id/comments
-create a new comment
DELETE /api/comments/:id
-delete a comment