diff options
author | nicolas <nclm@users.noreply.github.com> | 2016-11-25 08:53:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-25 08:53:34 +0100 |
commit | 9af6c52a41664e5b6dd7c200d696499e00cf1c01 (patch) | |
tree | e56114e766ee39c4825a556c0dc12e90240faece /app/assets/javascripts/components/actions | |
parent | 60577f4c6ee9f4a4c9af0a41a8954e19a5f2c8cf (diff) | |
parent | 543d06971e461510591ff64ebc666bd414e8e084 (diff) |
Merge pull request #3 from Gargron/master
Merge
Diffstat (limited to 'app/assets/javascripts/components/actions')
-rw-r--r-- | app/assets/javascripts/components/actions/suggestions.jsx | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/app/assets/javascripts/components/actions/suggestions.jsx b/app/assets/javascripts/components/actions/suggestions.jsx deleted file mode 100644 index 6b3aa69dd..000000000 --- a/app/assets/javascripts/components/actions/suggestions.jsx +++ /dev/null @@ -1,37 +0,0 @@ -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) => { - dispatch(fetchSuggestionsRequest()); - - api(getState).get('/api/v1/accounts/suggestions').then(response => { - dispatch(fetchSuggestionsSuccess(response.data)); - }).catch(error => { - dispatch(fetchSuggestionsFail(error)); - }); - }; -}; - -export function fetchSuggestionsRequest() { - return { - type: SUGGESTIONS_FETCH_REQUEST - }; -}; - -export function fetchSuggestionsSuccess(accounts) { - return { - type: SUGGESTIONS_FETCH_SUCCESS, - accounts: accounts - }; -}; - -export function fetchSuggestionsFail(error) { - return { - type: SUGGESTIONS_FETCH_FAIL, - error: error - }; -}; |