Page 1 of 1

Updating User Information

Posted: Thu Apr 04, 2013 7:38 pm
by Christine Stringfield

I have a screen on a mobile app for which I want to use to allow a logged in user to update their email address. I have added an "email" column to the Users collection provided by Tiggzi.

I read the documentation on updating Users with a PUT request, however it says to include the userID in the URL. How do I create a PUT request with a variable userID since I want this service to be used by the particular user that is logged in?

Image


Updating User Information

Posted: Thu Apr 04, 2013 8:05 pm
by Maryna Brodina

Hello! When you do Signing in (login) you get _id and sessionToken in responce. _id is the userID.

1) You would need to map that parameter to localStorage in Login service.
2) Change URL for update service to {database_url}/users/{userID}
3) add userID parameter in Request section.
4) Map this parameter to localStorage (see item 1)


Updating User Information

Posted: Thu Apr 04, 2013 9:16 pm
by Christine Stringfield

That all makes sense.

However when I invoke the service I still get an error...not sure if my settings are wrong or not.

Image

Image

Image


Updating User Information

Posted: Thu Apr 04, 2013 9:50 pm
by Maryna Brodina

Please delete Set local storage variable on Login- Success


Updating User Information

Posted: Thu Apr 04, 2013 10:08 pm
by Christine Stringfield

Awesome, that did the trick. Thank you so much for your help!