From 2d194d75aa6d8259f7881fb456dc926d063efa77 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 1 Jul 2020 15:08:18 -0500 Subject: [PATCH] Patron: Expect proxied endpoints --- app/soapbox/actions/patron.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/soapbox/actions/patron.js b/app/soapbox/actions/patron.js index 3f32e2ad8..ec9a35241 100644 --- a/app/soapbox/actions/patron.js +++ b/app/soapbox/actions/patron.js @@ -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));