Change pleroma config endpoint from static to api-based

This commit is contained in:
Haelwenn (lanodan) Monnier 2018-08-13 18:21:51 +02:00
parent 9fab20c069
commit 10df6a5aa1
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE
2 changed files with 2 additions and 2 deletions

View file

@ -38,7 +38,7 @@ export function fetchPleromaConfig() {
return (dispatch, getState) => { return (dispatch, getState) => {
dispatch(fetchPleromaConfigRequest()); dispatch(fetchPleromaConfigRequest());
api(getState).get('/static/config.json').then(response => { api(getState).get('/api/statusnet/config.json').then(response => {
dispatch(fetchPleromaConfigSuccess(response.data)); dispatch(fetchPleromaConfigSuccess(response.data));
}).catch(error => { }).catch(error => {
dispatch(fetchPleromaConfigFail(error)); dispatch(fetchPleromaConfigFail(error));

View file

@ -11,7 +11,7 @@ export function custom_panel(state = initialPanel, action) {
case PANEL_FETCH_SUCCESS: case PANEL_FETCH_SUCCESS:
return state.set('panel', action.panel); break; return state.set('panel', action.panel); break;
case PLEROMA_CONFIG_FETCH_SUCCESS: case PLEROMA_CONFIG_FETCH_SUCCESS:
return state.set('enabled', (action.config || {}).showInstanceSpecificPanel || false); return state.set('enabled', (action.config || {}).site.pleromafe.showInstanceSpecificPanel || false);
} }
return state; return state;