Splitting out helpers into separate files
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
|
||||
const helpers = require('./../../helpers');
|
||||
import { formatUser } from '../../util/format';
|
||||
const coreActions = require('../core/actions');
|
||||
const lastfmActions = require('./actions');
|
||||
|
||||
const LastfmMiddleware = (function () {
|
||||
const LastfmMiddleware = (function () {
|
||||
return (store) => (next) => (action) => {
|
||||
switch (action.type) {
|
||||
switch (action.type) {
|
||||
case 'LASTFM_ME_LOADED':
|
||||
var me = helpers.formatUser(action.me);
|
||||
var me = formatUser(action.me);
|
||||
Object.assign(
|
||||
me,
|
||||
{
|
||||
@ -34,4 +34,4 @@ const LastfmMiddleware = (function () {
|
||||
};
|
||||
}());
|
||||
|
||||
export default LastfmMiddleware;
|
||||
export default LastfmMiddleware;
|
||||
|
||||
Reference in New Issue
Block a user