mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-08 08:44:27 +00:00
16 lines
482 B
React
16 lines
482 B
React
|
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);
|
||
|
});
|
||
|
};
|
||
|
};
|