function* fetchProducts(action) {
	const { url } = action.payload;

	yield put(Connected.setStateAction({ productsFetchState: Constants.FETCHING_PRODUCTS }));

	const { response, data } = yield call(cmf.sagas.http.get, url);

	if (response.ok) {
		// Success, update collection
		yield put(Connected.setStateAction({ productsFetchState: Constants.FETCH_PRODUCTS_SUCCESS }));
		yield put(cmf.actions.collections.addOrReplace(Constants.COLLECTION_ID, data));
	} else {
		// Loading products failed
		yield put(Connected.setStateAction({ productsFetchState: Constants.FETCH_PRODUCTS_ERROR }));
	}
}
/**
 * This saga takes care of fetching authorized products for the HeaderBar
 * container according to the provided products URL in the action's payload.
 * @param {Object} action
 */
This saga takes care of fetching authorized products for the HeaderBar
container according to the provided products URL in the action's payload.
@param {Object} action
This saga takes care of fetching authorized products for the HeaderBar container according to the provided products URL in the action ' s payload . @param { Object } action
function* fetchProducts(action) {
	const { url } = action.payload;
	yield put(Connected.setStateAction({ productsFetchState: Constants.FETCHING_PRODUCTS }));
	const { response, data } = yield call(cmf.sagas.http.get, url);
	if (response.ok) {
		yield put(Connected.setStateAction({ productsFetchState: Constants.FETCH_PRODUCTS_SUCCESS }));
		yield put(cmf.actions.collections.addOrReplace(Constants.COLLECTION_ID, data));
	} else {
		yield put(Connected.setStateAction({ productsFetchState: Constants.FETCH_PRODUCTS_ERROR }));
	}
}
function * fetchProducts ( action ) { const { url } = action . payload ; yield put ( Connected . setStateAction ( { productsFetchState : Constants . FETCHING_PRODUCTS } ) ) ; const { response , data } = yield call ( cmf . sagas . http . get , url ) ; if ( response . ok ) { yield put ( Connected . setStateAction ( { productsFetchState : Constants . FETCH_PRODUCTS_SUCCESS } ) ) ; yield put ( cmf . actions . collections . addOrReplace ( Constants . COLLECTION_ID , data ) ) ; } else { yield put ( Connected . setStateAction ( { productsFetchState : Constants . FETCH_PRODUCTS_ERROR } ) ) ; } }
This saga takes care of fetching authorized products for the HeaderBar
 container according to the provided products URL in the action's payload.
This saga takes care of fetching authorized products for the HeaderBar container according to the provided products URL in the action ' s payload .
// Success, update collection // Loading products failed