remarked out a case, due to that case being triggered during a Soapbox settings save event, which needs debugging. Post to AdminConfig fails with 400 Bad Request response.

preload
Curtis ROck 2020-07-30 21:55:17 -05:00
rodzic 12caa8e0ce
commit 78df407e1e
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -2,6 +2,7 @@ import {
SOAPBOX_CONFIG_REQUEST_SUCCESS,
SOAPBOX_CONFIG_REQUEST_FAIL,
SOAPBOX_POST_SUCCESS,
SOAPBOX_POST_REQUEST,
} from '../actions/soapbox';
import { Map as ImmutableMap, fromJS } from 'immutable';
@ -17,9 +18,11 @@ export default function soapbox(state = initialState, action) {
return defaultState.merge(ImmutableMap(fromJS(action.soapboxConfig)));
case SOAPBOX_CONFIG_REQUEST_FAIL:
return defaultState;
case SOAPBOX_POST_REQUEST:
case SOAPBOX_POST_SUCCESS:
const soapbox = ImmutableMap(fromJS(action.soapboxConfig)).configs[0].value[0].tuple[1];
return soapbox;
// const soapbox = ImmutableMap(fromJS(action.soapboxConfig)).configs[0].value[0].tuple[1];
// return soapbox;
return defaultState;
default:
return state;
}