avishaan / lightTribe

LightTribe Backend and Collaboration Doc
2 stars 0 forks source link

Need to separate user settings route #60

Closed footnote closed 9 years ago

footnote commented 9 years ago

We need a separate route for updating user interests as well as another route for uploading user image, as in the design they are in different screens.

The route that should be separated POST /v1/users/{userId}

I believe that the resulted routes should be

1- POST /v1/users/{userId}/interests

Suggested Request Body

{
  "interests": [
    "bikramYoga1",
    "bikramYoga2"
  ]
}

2- POST /v1/users/{userId}/image

Suggested Request Body

{
  "userImage": "5572286715404b55c47017b7"
}
avishaan commented 9 years ago

Any reason we need to separate this? You can use the same route for either updating interests or updating the user image.

ShadiFares commented 9 years ago

Does it allow the user to update only his image using this route ? And not submit interests details?

On Jul 9, 2015, at 8:41 AM, codeHatcher notifications@github.com wrote:

Any reason we need to separate this? You can use the same route for either updating interests or updating the user image.

— Reply to this email directly or view it on GitHub.

avishaan commented 9 years ago

Only the items passed in are updated. If you pass in only the interests, then the interests are updated. If you pass in interest and userImage, then both are updated.

footnote commented 9 years ago

Sounds good