From 41247c08ea359d0a72a247992d2019ae2120536c Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 13 Feb 2019 22:56:35 +0100 Subject: interface working --- scraper/client/actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scraper/client/actions.js') 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', {}) } -- cgit v1.2.3-70-g09d2