mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-19 01:17:18 +02:00
* refactor: remove unused tags code * fix: remove feature tags Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
19 lines
632 B
JavaScript
19 lines
632 B
JavaScript
import api from './api';
|
|
import { dispatchError } from '../util';
|
|
import { receiveProjects } from '../project/actions';
|
|
import { receiveStrategies } from '../strategy/actions';
|
|
|
|
export const RECEIVE_BOOTSTRAP = 'RECEIVE_CONFIG';
|
|
export const ERROR_RECEIVE_BOOTSTRAP = 'ERROR_RECEIVE_CONFIG';
|
|
|
|
export function fetchUiBootstrap() {
|
|
return dispatch =>
|
|
api
|
|
.fetchUIBootstrap()
|
|
.then(json => {
|
|
dispatch(receiveProjects(json.projects));
|
|
dispatch(receiveStrategies(json.strategies));
|
|
})
|
|
.catch(dispatchError(dispatch, ERROR_RECEIVE_BOOTSTRAP));
|
|
}
|