You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
soapbox/app/gabsocial/actions/about.js

14 lines
449 B

import api from '../api';
export const FETCH_ABOUT_PAGE_REQUEST = 'FETCH_ABOUT_PAGE_REQUEST';
export const FETCH_ABOUT_PAGE_FAIL = 'FETCH_ABOUT_PAGE_FAIL';
export function fetchAboutPage(slug = 'index') {
return (dispatch, getState) => {
dispatch({ type: FETCH_ABOUT_PAGE_REQUEST, slug });
return api(getState).get(`/instance/about/${slug}.html`).catch(error => {
dispatch({ type: FETCH_ABOUT_PAGE_FAIL, slug });
});
};
}