diff options
| author | lens <lens@neural.garden> | 2020-12-26 20:59:17 +0000 |
|---|---|---|
| committer | lens <lens@neural.garden> | 2020-12-26 20:59:17 +0000 |
| commit | 7c15f34186622410e25ee85c01d832e48e012140 (patch) | |
| tree | e0a8dbd5e7b6a3936e7b9a666c2622ecc7ff1a65 /frontend/app/api/index.js | |
| parent | 94234db6a771f687788d3decc6dd1ba01731f7af (diff) | |
| parent | 85bfb949fea4e69dabc5b7544ce70d26d3d11393 (diff) | |
Merge branch 'master' of asdf.us:swimmer
Diffstat (limited to 'frontend/app/api/index.js')
| -rw-r--r-- | frontend/app/api/index.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/frontend/app/api/index.js b/frontend/app/api/index.js new file mode 100644 index 0000000..41cf624 --- /dev/null +++ b/frontend/app/api/index.js @@ -0,0 +1,21 @@ +import { crud_actions } from 'app/api/crud.actions' + +/* +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 'app/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 const actions = [ + 'graph', + 'page', + 'tile', + 'upload', +].reduce((a,b) => (a[b] = crud_actions(b)) && a, {}) |
