import * as types from 'app/types' import { session, getDefault, getDefaultInt } from 'app/session' import { crudState, crudReducer } from 'app/api/crud.reducer' const initialState = crudState('upload', { options: { sort: getDefault('upload.sort', 'id-desc'), thumbnailSize: getDefault('upload.thumbnailSize', 'small'), } }) const reducer = crudReducer('upload') export default function uploadReducer(state = initialState, action) { // console.log(action.type, action) state = reducer(state, action) switch (action.type) { default: return state } }