summaryrefslogtreecommitdiff
path: root/frontend/app/views/upload/upload.reducer.js
blob: 1f39f6ee1fb971eee901d2a1e903642182c447ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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'),
  }
})

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