Skip to content

Commit

Permalink
chore: remove use of entity service
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrebodin committed Apr 23, 2024
1 parent 3b831b1 commit ab53783
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions packages/core/admin/ee/server/src/services/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ const sendUpdateProjectInformation = async () => {
}

if (EE.features.isEnabled('cms-content-releases')) {
const numberOfContentReleases = await strapi.entityService.count(
'plugin::content-releases.release'
);
const numberOfPublishedContentReleases = await strapi.entityService.count(
'plugin::content-releases.release',
{
filters: { $not: { releasedAt: null } },
}
);
const numberOfContentReleases = await strapi.db
.query('plugin::content-releases.release')
.count();

const numberOfPublishedContentReleases = await strapi.db
.query('plugin::content-releases.release')
.count({
filters: { releasedAt: { $notNull: true } },
});

groupProperties = assign(groupProperties, {
numberOfContentReleases,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/admin/server/src/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default async ({ strapi }: { strapi: Strapi }) => {
await syncAuthSettings();
await syncAPITokensPermissions();

getService('metrics').sendUpdateProjectInformation();
await getService('metrics').sendUpdateProjectInformation();
getService('metrics').startCron(strapi);

apiTokenService.checkSaltIsDefined();
Expand Down

0 comments on commit ab53783

Please sign in to comment.