Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function* sagaPhotoGet3() {
const answer = yield call(sagas.http.get, 'https://jsonplaceholder.typicode.com/photos/');
yield put(actions.collections.addOrReplace('photos3', answer.data));
}
/**
* Register react-router-redux router reducer (see https://github.com/reactjs/react-router-redux)
*/
cmfStore.setRouterMiddleware(routerMiddleware(browserHistory));
/**
* Register http middleware
*/
const httpMiddleWareConfig = {
security: {
CSRFTokenCookieKey: 'XSRF-TOKEN',
CSRFTokenHeaderKey: 'X-XSRF-TOKEN',
},
};
cmfSagas.http.setDefaultConfig(httpMiddleWareConfig);
cmfStore.setHttpMiddleware(httpMiddleware(httpMiddleWareConfig));
/**
* Register your app reducers
*/
let reducers = {};
const additionalReducers = additionalConfiguration.reducers;
if (additionalReducers) {
reducers = {
...additionalReducers,
};
}
const sagaMiddleware = createSagaMiddleware();
const middlewares = [sagaMiddleware];
const additionalMiddlewares = additionalConfiguration.middlewares;
/**
* Register react-router-redux router reducer (see https://github.com/reactjs/react-router-redux)
*/
cmfStore.setRouterMiddleware(routerMiddleware(browserHistory));
/**
* Register http middleware
*/
const httpMiddleWareConfig = {
security: {
CSRFTokenCookieKey: 'XSRF-TOKEN',
CSRFTokenHeaderKey: 'X-XSRF-TOKEN',
},
};
cmfSagas.http.setDefaultConfig(httpMiddleWareConfig);
cmfStore.setHttpMiddleware(httpMiddleware(httpMiddleWareConfig));
/**
* Register your app reducers
*/
let reducers = {};
const additionalReducers = additionalConfiguration.reducers;
if (additionalReducers) {
reducers = {
...additionalReducers,
};
}
const sagaMiddleware = createSagaMiddleware();
const middlewares = [sagaMiddleware];
const additionalMiddlewares = additionalConfiguration.middlewares;