Page 1 of 1

Using user collection

Posted: Sat Jan 03, 2015 4:44 pm
by Thomas Anderson7286790

I'm struggling a bit with the user collection. My goal is to create the cleanest method of loading a user's fields into a local storage model on my app on login. I have successfully set up the login_service and am able to get the user's _id and session token into local storage variables. How do I get the other fields I have created in the users collection into a storage model?

I have looked at this:

http://devcenter.appery.io/documentat...

but I can't figure out how to include the user's _id from local storage in the URL of the service request. The example shows adding the user _id directly to the url.

i.e. https://api.appery.io/rest/1/db/users... instead of something like this:

https://api.appery.io/rest/1/db/users...

where user_id is the local storage variable storing the user's _id for the user collection row for that user.

Thanks

Thanks


Using user collection

Posted: Sun Jan 04, 2015 7:27 am
by Alena Prykhodko

Hello Thomas,

Please show us what you have tried.
Service settings screen shots will help.


Using user collection

Posted: Sun Jan 04, 2015 5:43 pm
by Thomas Anderson7286790

Figured this out. I wasn't including the session token properly in the header.

Thanks anyway!