move warning to bootstrap

This commit is contained in:
Marc-Roig 2023-01-20 09:41:26 +01:00
parent 30fa5bd2c3
commit 69b9ee42a2
2 changed files with 8 additions and 7 deletions

View File

@ -6,4 +6,12 @@ module.exports = async () => {
await getService('components').syncConfigurations();
await getService('content-types').syncConfigurations();
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.'
);
}
};

View File

@ -67,13 +67,6 @@ const isRelationsPopulateEnabled = () => {
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 });
/**