olegkord / HoopHub

Node JS project for General Assembly WDI
0 stars 0 forks source link

BE #1: users controller #9

Closed olegkord closed 8 years ago

olegkord commented 8 years ago

Everything required in the users controller:

/users:

  1. Router.route('/')
    .post( (req,res) => { } ---> Generates a new user. Redirects to the user page
  2. 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

olegkord commented 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

olegkord commented 8 years ago

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.

olegkord commented 8 years ago

Still need logout path, captured in another issue