diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-02-13 22:56:35 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-02-13 22:56:35 +0100 |
| commit | 41247c08ea359d0a72a247992d2019ae2120536c (patch) | |
| tree | 89becc97e6831dd95cb5d96b297a2ce5d4395009 /scraper/client/actions.js | |
| parent | a2f1969b2c7c185e04e19c22a83245ad22f8df0c (diff) | |
interface working
Diffstat (limited to 'scraper/client/actions.js')
| -rw-r--r-- | scraper/client/actions.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scraper/client/actions.js b/scraper/client/actions.js index 2723deed..4e1fd620 100644 --- a/scraper/client/actions.js +++ b/scraper/client/actions.js @@ -3,7 +3,7 @@ import * as types from './types' export const api = (dispatch, method, tag, url, params) => { dispatch({ type: types.api.loading, tag }) - get(url, params).then(data => { + method(url, params).then(data => { dispatch({ type: types.api.loaded, tag, data }) }).catch(err => { dispatch({ type: types.api.error, tag, err }) @@ -18,7 +18,7 @@ export const getPapers = () => dispatch => { api(dispatch, get, 'papers', '/api/papers', {}) } -export const getPaperInfo = (key) => dispatch => { +export const getPaperInfo = key => dispatch => { api(dispatch, get, 'paperInfo', '/reports/datasets/final/' + key + '.json', {}) api(dispatch, get, 'unknownCitations', '/reports/datasets/unknown/' + key + '.json', {}) } |
