mirror of
https://github.com/strapi/strapi.git
synced 2025-10-28 08:32:08 +00:00
move warning to bootstrap
This commit is contained in:
parent
30fa5bd2c3
commit
69b9ee42a2
@ -6,4 +6,12 @@ module.exports = async () => {
|
|||||||
await getService('components').syncConfigurations();
|
await getService('components').syncConfigurations();
|
||||||
await getService('content-types').syncConfigurations();
|
await getService('content-types').syncConfigurations();
|
||||||
await getService('permission').registerPermissions();
|
await getService('permission').registerPermissions();
|
||||||
|
|
||||||
|
// TODO: V5, remove this warning
|
||||||
|
if (strapi.config.get('server.webhooks.populateRelations', true)) {
|
||||||
|
process.emitWarning(
|
||||||
|
'[deprecated] Relations population in webhooks is enabled. This is not recommended for production and will degrade performance. ' +
|
||||||
|
'Please set `server.webhooks.populateRelations` to `false` in your `config/server.js` file.'
|
||||||
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -67,13 +67,6 @@ const isRelationsPopulateEnabled = () => {
|
|||||||
return strapi.config.get('server.webhooks.populateRelations', true);
|
return strapi.config.get('server.webhooks.populateRelations', true);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isRelationsPopulateEnabled()) {
|
|
||||||
process.emitWarning(
|
|
||||||
'[deprecated] Relations population in webhooks is enabled. This is not recommended for production and will degrade performance. ' +
|
|
||||||
'Please set `server.webhooks.populateRelations` to `false` in your `config/server.js` file.'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const getCountDeepPopulate = (uid) => getDeepPopulate(uid, { countMany: true, countOne: true });
|
const getCountDeepPopulate = (uid) => getDeepPopulate(uid, { countMany: true, countOne: true });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user