Christine Stringfield
Posts: 0
Joined: Wed Apr 03, 2013 4:35 am

Updating User Information

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Updating User Information

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)

Christine Stringfield
Posts: 0
Joined: Wed Apr 03, 2013 4:35 am

Updating User Information

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Updating User Information

Please delete Set local storage variable on Login- Success

Christine Stringfield
Posts: 0
Joined: Wed Apr 03, 2013 4:35 am

Updating User Information

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

Return to “Issues”