Patron: Expect proxied endpoints
This commit is contained in:
parent
8144c7d508
commit
2d194d75aa
1 changed files with 2 additions and 3 deletions
|
@ -1,12 +1,11 @@
|
|||
import axios from 'axios';
|
||||
import api from '../api';
|
||||
|
||||
export const PATRON_FUNDING_IMPORT = 'PATRON_FUNDING_IMPORT';
|
||||
export const PATRON_FUNDING_FETCH_FAIL = 'PATRON_FUNDING_FETCH_FAIL';
|
||||
|
||||
export function fetchFunding() {
|
||||
return (dispatch, getState) => {
|
||||
const baseUrl = getState().getIn(['soapbox', 'extensions', 'patron', 'baseUrl']);
|
||||
axios.get(`${baseUrl}/api/patron/v1/instance`).then(response => {
|
||||
api(getState).get('/api/patron/v1/instance').then(response => {
|
||||
dispatch(importFetchedFunding(response.data));
|
||||
}).catch(error => {
|
||||
dispatch(fetchFundingFail(error));
|
||||
|
|
Loading…
Reference in a new issue