You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I want to get my profile data I have to do two calls
hoodie.account.signIn({username: 'foo',password: 'bar'}).then(function(){returnhoodie.account.profile.fetch()}).then(function(){// hoodie.account.profile.get() now returns locally cached profile data})
Our JSON API supports the ?include parameter for all requests, so we could do two things
I would suggest to include option to signIn / signOut methods (we already do this for some of the admin API methods). The fetch method would need to send the ?include=account.profile param if it was called with something like account.fetch('profile.settings')
With that change all profile properties would be cached offline after signIn, so we can do hoodie.account.profile.get() later any time, even without an internet connection.
If I want to get my profile data I have to do two calls
Our JSON API supports the
?include
parameter for all requests, so we could do two thingsI would suggest to
include
option to signIn / signOut methods (we already do this for some of the admin API methods). Thefetch
method would need to send the?include=account.profile
param if it was called with something likeaccount.fetch('profile.settings')
With that change all profile properties would be cached offline after signIn, so we can do
hoodie.account.profile.get()
later any time, even without an internet connection.The text was updated successfully, but these errors were encountered: