2022-12-06 12:14:33 +01:00
|
|
|
'use strict';
|
|
|
|
|
2022-12-12 18:09:24 +01:00
|
|
|
const { features } = require('@strapi/strapi/lib/utils/ee');
|
2022-12-07 14:43:28 +01:00
|
|
|
const executeCERegister = require('../../server/register');
|
2022-12-12 18:09:24 +01:00
|
|
|
const createAuditLogsService = require('./services/audit-logs');
|
2022-12-06 12:14:33 +01:00
|
|
|
|
|
|
|
module.exports = async ({ strapi }) => {
|
2022-12-12 18:09:24 +01:00
|
|
|
if (features.isEnabled('audit-logs')) {
|
|
|
|
const auditLogsService = createAuditLogsService(strapi);
|
|
|
|
strapi.container.register('audit-logs', auditLogsService);
|
|
|
|
auditLogsService.bootstrap();
|
|
|
|
}
|
2022-12-08 16:04:31 +01:00
|
|
|
// TODO: register auditLogs provider here
|
2022-12-12 18:09:24 +01:00
|
|
|
|
2022-12-07 14:43:28 +01:00
|
|
|
await executeCERegister({ strapi });
|
2022-12-06 12:14:33 +01:00
|
|
|
};
|