| Total Complexity | 6 |
| Complexity/F | 1 |
| Lines of Code | 16 |
| Function Count | 6 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | import { createAction, handleActions } from 'redux-actions'; |
||
| 2 | import { pipe } from 'ramda'; |
||
| 3 | |||
| 4 | 1 | export const FETCH_SERVERS = 'shlink/servers/FETCH_SERVERS'; |
|
| 5 | |||
| 6 | 1 | export const listServers = ({ listServers }) => createAction(FETCH_SERVERS, () => listServers()); |
|
| 7 | |||
| 8 | 1 | export const createServer = ({ createServer }, listServers) => pipe(createServer, listServers); |
|
| 9 | |||
| 10 | 1 | export const deleteServer = ({ deleteServer }, listServers) => pipe(deleteServer, listServers); |
|
| 11 | |||
| 12 | 1 | export const createServers = ({ createServers }, listServers) => pipe(createServers, listServers); |
|
| 13 | |||
| 14 | export default handleActions({ |
||
| 15 | 1 | [FETCH_SERVERS]: (state, { payload }) => payload, |
|
| 16 | }, {}); |
||
| 17 |