Sharing of configuration and other authorizations
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
|
||||
var helpers = require('./../../helpers')
|
||||
var coreActions = require('../core/actions')
|
||||
var helpers = require('./../../helpers');
|
||||
var coreActions = require('../core/actions');
|
||||
var geniusActions = require('./actions');
|
||||
|
||||
const GeniusMiddleware = (function(){
|
||||
return store => next => action => {
|
||||
@ -38,6 +39,15 @@ const GeniusMiddleware = (function(){
|
||||
next(action);
|
||||
break;
|
||||
|
||||
case 'GENIUS_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(geniusActions.getMe())}, 100);
|
||||
|
||||
next(action);
|
||||
break;
|
||||
|
||||
|
||||
// This action is irrelevant to us, pass it on to the next middleware
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user