9 lines
254 B
JavaScript
9 lines
254 B
JavaScript
export default store => next => action => {
|
|
if (action.meta &&
|
|
action.meta.callback &&
|
|
action.type.endsWith('SUCCESS') &&
|
|
typeof action.meta.callback === 'function') {
|
|
action.meta.callback(action.payload);
|
|
}
|
|
return next(action);
|
|
};
|