Thomas Anderson7286790
Posts: 0
Joined: Sat Dec 20, 2014 3:46 pm

Using user collection

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

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Using user collection

Hello Thomas,

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

Thomas Anderson7286790
Posts: 0
Joined: Sat Dec 20, 2014 3:46 pm

Using user collection

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

Thanks anyway!

Return to “Issues”