diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-07-22 14:05:15 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-07-22 14:05:15 +0200 |
| commit | ef78bc6a084f92b4794e987b5832240d85b6479e (patch) | |
| tree | b314b630800db6aa60f28ef0b115625e6ca176db /animism-align/frontend/api/crud.types.js | |
| parent | 85d4cb9addf9ca887d3440b2786665d67d9917c4 (diff) | |
refactor app using babel module-resolver
Diffstat (limited to 'animism-align/frontend/api/crud.types.js')
| -rw-r--r-- | animism-align/frontend/api/crud.types.js | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/animism-align/frontend/api/crud.types.js b/animism-align/frontend/api/crud.types.js deleted file mode 100644 index 7a64f5c..0000000 --- a/animism-align/frontend/api/crud.types.js +++ /dev/null @@ -1,36 +0,0 @@ - -export const as_type = (a, b) => [a, b].join('_').toUpperCase() - -export const with_type = (type, actions) => - actions.reduce((a, b) => (a[b] = as_type(type, b)) && a, {}) - -export const crud_type = (type, actions=[]) => - with_type(type, actions.concat([ - 'index_loading', - 'index', - 'index_error', - 'index_sort', - 'show_loading', - 'show', - 'show_error', - 'create_loading', - 'create', - 'create_error', - 'update_loading', - 'update', - 'update_error', - 'destroy_loading', - 'destroy', - 'destroy_error', - 'upload_loading', - 'upload_progress', - 'upload_waiting', - 'upload_complete', - 'upload_error', - 'sort', - 'update_option', - 'update_options', - 'loading', - 'loaded', - 'error', - ])) |
