Fix audit logs ee.disable listener

This commit is contained in:
Rémi de Juvigny 2023-03-22 12:31:07 +01:00
parent 498dc2fcbb
commit 52705947d8

View File

@ -149,13 +149,11 @@ const createAuditLogsService = (strapi) => {
} }
// Handle license being disabled // Handle license being disabled
if (!state.eeDisableUnsubscribe) { state.eeDisableUnsubscribe = strapi.eventHub.on('ee.disable', () => {
state.eeDisableUnsubscribe = strapi.eventHub.on('ee.disable', () => { // Turn off service when the license gets disabled
// Turn off service when the license gets disabled // Only ee.enable and ee.update listeners remain active to recreate the service
// ee.enable and ee.update listeners remain active to recreate the service this.destroy();
this.destroy(); });
});
}
// Register the provider now because collections can't be added later at runtime // Register the provider now because collections can't be added later at runtime
state.provider = await localProvider.register({ strapi }); state.provider = await localProvider.register({ strapi });