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 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: