Giter VIP home page Giter VIP logo

anywhere-fitness-back-end's Introduction

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

anywhere-fitness-back-end's People

Contributors

ruizaj13 avatar justicematthew avatar nrhietala avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.