Fix stats request

This commit is contained in:
2026-04-21 19:46:58 +04:00
parent b71f1535bb
commit e7bc8790b1
+6 -7
View File
@@ -2,13 +2,12 @@
module.exports = {
async count(ctx, next) {
const countArtiste = await strapi.entityService.count('api::artiste.artiste')
const countParole = await strapi.entityService.count('api::parole.parole', {
filters: {
publishedAt: {
$notNull: true,
}
}
const countArtiste = await strapi.documents('api::artiste.artiste').count({
publicationState: 'live'
})
const countParole = await strapi.documents('api::parole.parole').count({
publicationState: 'live'
})
return {countArtiste, countParole}