-
Notifications
You must be signed in to change notification settings - Fork 0
Backend Routes
Ryan Schneider edited this page May 23, 2022
·
9 revisions
Travel Bucket uses the following api routes, each route should be proceeded with '/api'
-
/users/
'post' creates a new user -
/users/:id
'get' returns User with that id
-
/auth/
'get' Authenticates a User -
/auth/login
'post' Logs in a User -
/auth/logout
'get' Logs out a User -
/auth/signup
'post' Creates a new user and logs them in -
/auth/unauthorized
'get' Returns unauthorized JSON when flask-login authentication fails
-
/session/
'post' logins with credentials and password -
/session/
'delete' logs out the user -
/session/
'get' restores session user
-
/heros/all
'GET' gets all Heros. Site Admin only -
/heros/
'GET' gets all a user's Heros -
/heros/
'POST' creates a new Hero -
/heros/:id
'GET' get a Hero by ID -
/heros/:id
'PUT' edits a user's Hero -
/heros/:id
'DELETE' Delete a user's Hero
-
/abilities/all
'GET' gets all Abilities. Site Admin only -
/abilities/
'GET' gets all a user's Abilities -
/abilities/
'POST' creates a new Ability -
/abilities/:id
'GET' gets a user's Ability by ID -
/abilities/:id
'PUT' edits a user's Ability -
/abilities/:id
'DELETE' Delete a user's Ability
-
/hero_abil/all
'GET' gets all Abilities. Site Admin only -
/hero_abil/:id
'GET' gets all a Hero's Abilities -
/hero_abil/:id
'POST' adds an Ability to a Hero -
/hero_abil/:id
'DELETE' remove an Ability from a Hero