diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-29 02:07:53 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-29 02:07:53 +0200 |
| commit | 1fb8a9e663238eb15e1f92b93c5484867ea9feec (patch) | |
| tree | 0160c7ef4c40fccb333cb3f34c01101f6917eb8d /app/client/api/crud.actions.js | |
| parent | 453decc3deb494175a81ea7dd74e4074bc5d2e60 (diff) | |
default crud actions..
Diffstat (limited to 'app/client/api/crud.actions.js')
| -rw-r--r-- | app/client/api/crud.actions.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/client/api/crud.actions.js b/app/client/api/crud.actions.js index 10abbba..59d4d82 100644 --- a/app/client/api/crud.actions.js +++ b/app/client/api/crud.actions.js @@ -16,7 +16,13 @@ so you can do ... export function crud_actions(type) { const fetch_type = crud_fetch(type) - return ['index', 'show', 'create', 'update', 'destroy'].reduce((lookup, param) => { + return [ + 'index', + 'show', + 'create', + 'update', + 'destroy' + ].reduce((lookup, param) => { lookup[param] = crud_action(type, param, () => fetch_type[type](param)]), return lookup }, { |
