diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-29 02:01:04 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-29 02:01:04 +0200 |
| commit | a77de3f5ee9826e8391735ee18809fc716c35bbd (patch) | |
| tree | fa2092c7e3fff41f82c5864995fa84ece5dbdee7 /app/client/api/crud.fetch.js | |
| parent | 0296adc3ace0e36b92a56ec3a01a933b9bbd2e99 (diff) | |
dispatch all the events lol
Diffstat (limited to 'app/client/api/crud.fetch.js')
| -rw-r--r-- | app/client/api/crud.fetch.js | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/app/client/api/crud.fetch.js b/app/client/api/crud.fetch.js index fadd2b6..421510b 100644 --- a/app/client/api/crud.fetch.js +++ b/app/client/api/crud.fetch.js @@ -1,7 +1,7 @@ import fetch from 'node-fetch' export function crud_fetch(type, tag) { - const uri = '/' + type + 's/' + (tag || '') + const uri = '/api/' + type + '/' + (tag || '') return { index: q => { return fetch(_get_url(uri, q), _get_headers()) @@ -32,12 +32,6 @@ export function crud_fetch(type, tag) { .then(req => req.json()) .catch(error) }, - - upload: data => { - return fetch(uri, postBody(data)) - .then(req => req.json()) - .catch(error) - }, } } |
