Merge pull request #1581 from kamalbennani/bugfix/#1580/take-into-account-allowGa-config-prop

Take into account allowGa value
This commit is contained in:
Jim LAURIE 2018-07-17 12:07:25 +02:00 committed by GitHub
commit bc447d1167
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,15 +11,15 @@ import { GET_GA_STATUS, GET_LAYOUT } from './constants';
function* getGaStatus() {
try {
const [allowGa, strapiVersion, currentEnvironment] = yield [
const [{ allowGa }, { strapiVersion }, { currentEnvironment }] = yield [
call(request, '/admin/gaConfig', { method: 'GET' }),
call(request, '/admin/strapiVersion', { method: 'GET' }),
call(request, '/admin/currentEnvironment', { method: 'GET' }),
];
yield put(getCurrEnvSucceeded(currentEnvironment.currentEnvironment));
yield put(getCurrEnvSucceeded(currentEnvironment));
yield put(getGaStatusSucceeded(allowGa));
yield put(getStrapiVersionSucceeded(strapiVersion.strapiVersion));
yield put(getStrapiVersionSucceeded(strapiVersion));
} catch(err) {
strapi.notification.error('notification.error');
}