Porównaj commity

...

1 Commity

Autor SHA1 Wiadomość Data
Alex Gleason 7a5702e255
Fetch soapbox.json from the server (like an API) 2022-05-17 06:43:45 -05:00
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -6,7 +6,7 @@ import KVStore from 'soapbox/storage/kv_store';
import { removeVS16s } from 'soapbox/utils/emoji';
import { getFeatures } from 'soapbox/utils/features';
import api, { staticClient } from '../api';
import api from '../api';
export const SOAPBOX_CONFIG_REQUEST_SUCCESS = 'SOAPBOX_CONFIG_REQUEST_SUCCESS';
export const SOAPBOX_CONFIG_REQUEST_FAIL = 'SOAPBOX_CONFIG_REQUEST_FAIL';
@ -88,7 +88,7 @@ export function loadSoapboxConfig() {
export function fetchSoapboxJson(host) {
return (dispatch, getState) => {
return staticClient.get('/instance/soapbox.json').then(({ data }) => {
return api(getState).get('/instance/soapbox.json').then(({ data }) => {
if (!isObject(data)) throw 'soapbox.json failed';
dispatch(importSoapboxConfig(data, host));
return data;