From e21a3fe0cd91dfeae76bce4d58c7611e78b60fbf Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 14 Oct 2016 23:10:07 +0200 Subject: Adding sync of follow relationships to Neo4J, accounts/suggestions API --- app/assets/javascripts/components/actions/suggestions.jsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 app/assets/javascripts/components/actions/suggestions.jsx (limited to 'app/assets') diff --git a/app/assets/javascripts/components/actions/suggestions.jsx b/app/assets/javascripts/components/actions/suggestions.jsx new file mode 100644 index 000000000..562a901c5 --- /dev/null +++ b/app/assets/javascripts/components/actions/suggestions.jsx @@ -0,0 +1,15 @@ +import api from '../api'; + +export const SUGGESTIONS_FETCH_REQUEST = 'SUGGESTIONS_FETCH_REQUEST'; +export const SUGGESTIONS_FETCH_SUCCESS = 'SUGGESTIONS_FETCH_SUCCESS'; +export const SUGGESTIONS_FETCH_FAIL = 'SUGGESTIONS_FETCH_FAIL'; + +export function fetchSuggestions() { + return (dispatch, getState) => { + api(getState).get('/api/v1/accounts/suggestions').then(response => { + console.log(response.data); + }).catch(error => { + console.error(error); + }); + }; +}; -- cgit