Fix stats request
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user