Fix stats request
This commit is contained in:
@@ -2,13 +2,12 @@
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
async count(ctx, next) {
|
async count(ctx, next) {
|
||||||
const countArtiste = await strapi.entityService.count('api::artiste.artiste')
|
const countArtiste = await strapi.documents('api::artiste.artiste').count({
|
||||||
const countParole = await strapi.entityService.count('api::parole.parole', {
|
publicationState: 'live'
|
||||||
filters: {
|
})
|
||||||
publishedAt: {
|
|
||||||
$notNull: true,
|
const countParole = await strapi.documents('api::parole.parole').count({
|
||||||
}
|
publicationState: 'live'
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return {countArtiste, countParole}
|
return {countArtiste, countParole}
|
||||||
|
|||||||
Reference in New Issue
Block a user