mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
Run prettier
This commit is contained in:
parent
9569d5fb80
commit
16eabd438b
@ -7,7 +7,7 @@ const getSSOProvidersList = async () => {
|
|||||||
const { providerRegistry } = strapi.admin.services.passport;
|
const { providerRegistry } = strapi.admin.services.passport;
|
||||||
|
|
||||||
return providerRegistry.getAll().map(({ uid }: { uid: string }) => uid);
|
return providerRegistry.getAll().map(({ uid }: { uid: string }) => uid);
|
||||||
}
|
};
|
||||||
|
|
||||||
const sendUpdateProjectInformation = async () => {
|
const sendUpdateProjectInformation = async () => {
|
||||||
let groupProperties = {};
|
let groupProperties = {};
|
||||||
@ -18,24 +18,35 @@ const sendUpdateProjectInformation = async () => {
|
|||||||
if (EE.features.isEnabled('sso')) {
|
if (EE.features.isEnabled('sso')) {
|
||||||
const SSOProviders = await getSSOProvidersList();
|
const SSOProviders = await getSSOProvidersList();
|
||||||
|
|
||||||
groupProperties = assign(groupProperties, { SSOProviders, isSSOConfigured: SSOProviders.length !== 0 });
|
groupProperties = assign(groupProperties, {
|
||||||
|
SSOProviders,
|
||||||
|
isSSOConfigured: SSOProviders.length !== 0,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EE.features.isEnabled('cms-content-releases')) {
|
if (EE.features.isEnabled('cms-content-releases')) {
|
||||||
const numberOfContentReleases = await strapi.entityService.count('plugin::content-releases.release');
|
const numberOfContentReleases = await strapi.entityService.count(
|
||||||
const numberOfPublishedContentReleases = await strapi.entityService.count('plugin::content-releases.release', {
|
'plugin::content-releases.release'
|
||||||
filters: { $not: { releasedAt: null } }
|
);
|
||||||
});
|
const numberOfPublishedContentReleases = await strapi.entityService.count(
|
||||||
|
'plugin::content-releases.release',
|
||||||
|
{
|
||||||
|
filters: { $not: { releasedAt: null } },
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
groupProperties = assign(groupProperties, { numberOfContentReleases, numberOfPublishedContentReleases });
|
groupProperties = assign(groupProperties, {
|
||||||
|
numberOfContentReleases,
|
||||||
|
numberOfPublishedContentReleases,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
groupProperties = assign(groupProperties, { numberOfActiveAdminUsers, numberOfAdminUsers });
|
groupProperties = assign(groupProperties, { numberOfActiveAdminUsers, numberOfAdminUsers });
|
||||||
|
|
||||||
strapi.telemetry.send('didUpdateProjectInformation', {
|
strapi.telemetry.send('didUpdateProjectInformation', {
|
||||||
groupProperties
|
groupProperties,
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
const startCron = (strapi: Strapi) => {
|
const startCron = (strapi: Strapi) => {
|
||||||
strapi.cron.add({
|
strapi.cron.add({
|
||||||
@ -43,9 +54,4 @@ const startCron = (strapi: Strapi) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export {
|
export { startCron, getSSOProvidersList, sendUpdateProjectInformation };
|
||||||
startCron,
|
|
||||||
getSSOProvidersList,
|
|
||||||
sendUpdateProjectInformation,
|
|
||||||
};
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user