-
Notifications
You must be signed in to change notification settings - Fork 0
Backend Routes
Derek Roode edited this page Apr 16, 2021
·
14 revisions
-
/users/-
GET- Get a list of users
-
-
/users/<int:id>-
GET- Get a user by id
-
-
/auth/-
GET- authenticates a user
-
-
/auth/login-
POST- Logs a user in
-
-
/auth/logout-
POST- Logs a user out
-
-
/auth/signup-
POST- Creates a new user and logs them in
-
-
/auth/unauthorized-
GET- Returns unauthorized JSON when flask-login authentication fails
-
-
/groups/-
GET- Get all of the groups
-
POST- Create a group
-
-
/groups/<int:id>-
GET- Get a given group
-
PATCH- Update a given groups information
-
DELETE- Delete a given group
-
-
/groups/<int:id>/comments-
GET- Returns comments for a given groups
-
POST- Creates a comment for a given group
-
-
/groups/user_group-
GET- Returns current users groups
-
POST- Add a group to current user groups
-
DELETE- Removes a group from current user groups
-
-
/groups/user_group/<int:id>-
GET- Returns single user group
-
DELETE- Removes single user group
-
-
/comments/<int:id>-
GET- Get data for a given comment
-
PATCH- Update data for a given comment
-
DELETE- Delete a given comment
-
-
/action_shots/-
GET- Get all of the action_shots
-
POST- Create an action shot
-
-
/action_shots/<int:id>-
GET- Get a specific action shot
-
DELETE- Delete a specific action shot
-
-
/progress_photos/-
GET- Get all of the progress photos
-
POST- Create an progress photo
-
-
/progress_photos/<int:id>-
GET- Get a specific progress photo
-
DELETE- Delete a specific progress photo
-
-
/workouts/-
GET- Get all of the workouts
-
POST- Add a workout.
-
-
/workouts/<int:id>-
GET- Get a workout by id
-
-
/workouts/my_workouts-
GET- Get all of the workouts for a given user
-
POST- Add a workout to a users workout table
-
-
/workouts/user_workouts/completed-
GET- Get the total number of workouts completed by all users
-
-
/workouts/user_workouts/completed/user-
GET- Get the total number of workouts completed a single user
-
PATCH- Update the workouts completed by a single user
-