Sharing of configuration and other authorizations

This commit is contained in:
James Barnsley
2018-09-30 20:09:12 +13:00
parent 96359e0b42
commit 127a8322d0
26 changed files with 996 additions and 472 deletions

View File

@ -1,6 +1,7 @@
var helpers = require('./../../helpers');
var coreActions = require('../core/actions');
var lastfmActions = require('./actions');
const LastfmMiddleware = (function(){
@ -20,6 +21,15 @@ const LastfmMiddleware = (function(){
next(action);
break;
case 'LASTFM_IMPORT_AUTHORIZATION':
// Wait a few moments before we fetch, allowing the import to complete first
// TODO: Use callbacks for better code accuracy
setTimeout(() => {store.dispatch(lastfmActions.getMe())}, 100);
next(action);
break;
default:
return next(action);
}