Closed olegkord closed 8 years ago
Request user information from the database:
path: /users/:id
get: Will fetch user data post: Will create user data delete: Will delete user data put: Will update user data
Add a player to the user's list:
path: /users/:id
put ---> BUT MAYBE with a custom path?
1) GET relevant playerinformation from Yahoo API 2) PUT in users controller to update the user's player array.
Still need logout path, captured in another issue
Everything required in the users controller:
/users:
.post( (req,res) => { } ---> Generates a new user. Redirects to the user page
Router.route('/:id')
.get( (req,res) => etc ---> request user information for ONE user
.post( (req,res) => ---> edit a user specified in ID
.delete( (req,res) => etc ---> delete user specified in ID