Skip to content

Database to power online classroom enrollment and management tool for remote fitness classes

License

Notifications You must be signed in to change notification settings

ruizaj13/Anywhere-Fitness-Back-end

 
 

Repository files navigation

Anywhere-Fitness

Front-End:

https://github.com/anywhere-fitness-tt2/Front-end

Deployed Site:

https://anywhere-fitness-tt2.vercel.app/

Auth End-Points

AUTH URL Requires Restrictions Returns
POST /api/auth/register -username
-email
-password
-role
None Newly created user with
auto-generated userId
POST /api/auth/login -username
-password
None Logged in user data and
JWT token for authorization

User End-Points

Users URL Requires Restrictions Returns
GET /api/users/ N/A -Valid Token Object Array of all Users
(instructors & students)
GET /api/users/:id N/A -Valid Token Individual user object
GET /api/users/:id/classes N/A -Valid Token Object array of a user's
enrolled classes
PUT /api/users/:id -Any of the

keys (ex. username)
-Valid Token Single object of updated user's
data
DELETE /api/users/:id N/A -Valid Token Deleted user
POST /api/users/enrollment -The classID of the class
the currently logged in user
wants to enroll in
-Valid Token Success/Error message
DELETE /api/users/enrollment/:id N/A -Valid Token Success/Error message

Class End-Points

Classes URL Requires Restrictions Returns
GET /api/classes/ N/A -Valid Token Object Array of all Classes
GET /api/classes/:id N/A -Valid Token Individual class object
GET /api/classes/:id/students N/A -Valid Token Object array of the currently
enrolled students in the class
GET /api/classes/:id/instructors N/A -Valid Token Object array of the instructor(s)
for the class
POST /api/classes/ -name
-type
-time
-duration
-intensityLvl
-location
-attendees (integer)
-maxSize (integer)
-Valid Token
-Can only be used
when currently
logged in as an
instructor
Single object of newly created
class
PUT /api/classes/:id -Appropriate keys
with changed values
-Valid Token
-Can only be used
when currently
logged in as an
instructor
Single object of updated class
data
DELETE /api/classes/:id N/A -Valid Token
-Can only be used
when currently
logged in as an
instructor
The deleted class

About

Database to power online classroom enrollment and management tool for remote fitness classes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%