Spotify.access will be checker for full access

This commit is contained in:
James Barnsley
2017-08-04 22:33:49 +12:00
parent c2b8cfb346
commit e1ee57bdad
15 changed files with 100 additions and 92 deletions

View File

@ -335,6 +335,12 @@ const PusherMiddleware = (function(){
authorization_url: (action.config.authorization_url ? action.config.authorization_url : null),
backend_username: (action.config.spotify_username ? action.config.spotify_username : null)
}))
// Get our backend_username user
if (store.getState().spotify.access !== 'none' && (!store.getState().core.users || !store.getState().core.users[action.config.spotify_username])){
store.dispatch(spotifyActions.getUser(action.config.spotify_username))
}
next( action )
break