diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-06-23 23:18:07 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-06-23 23:18:07 +0200 |
| commit | 3cf70771cb45cc16ec33ffe44e7a1a4799d8f395 (patch) | |
| tree | 55f0edb53141d5f043b486d722f507bfd94abdea /animism-align/frontend/api/index.js | |
| parent | 014816dc724c1be60b7dd28d4e608c89b4ed451c (diff) | |
adding web app base
Diffstat (limited to 'animism-align/frontend/api/index.js')
| -rw-r--r-- | animism-align/frontend/api/index.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/animism-align/frontend/api/index.js b/animism-align/frontend/api/index.js new file mode 100644 index 0000000..cb6f22a --- /dev/null +++ b/animism-align/frontend/api/index.js @@ -0,0 +1,21 @@ +import { crud_actions } from './crud.actions' +import * as util from '../util' + +/* +for our crud events, create corresponding actions +the actions fire a 'loading' event, call the underlying api method, and then resolve. +so you can do ... + import { folderActions } from '../../api' + folderActions.index({ module: 'samplernn' }) + folderActions.show(12) + folderActions.create({ module: 'samplernn', name: 'foo' }) + folderActions.update(12, { module: 'pix2pix' }) + folderActions.destroy(12, { confirm: true }) + folderActions.upload(12, form_data) +*/ + +export { util } + +export const actions = [ + 'upload', +].reduce((a,b) => (a[b] = crud_actions(b)) && a, {}) |
