Remove unused stats
This commit is contained in:
@@ -10,87 +10,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const countParoleWithoutFrancais = await strapi.entityService.count('api::parole.parole', {
|
|
||||||
filters: {
|
|
||||||
traductions: {
|
|
||||||
francais: {
|
|
||||||
$null: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
publishedAt: {
|
|
||||||
$notNull: true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const countParoleWithoutAnglais = await strapi.entityService.count('api::parole.parole', {
|
return {countArtiste, countParole}
|
||||||
filters: {
|
|
||||||
traductions: {
|
|
||||||
anglais: {
|
|
||||||
$null: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
publishedAt: {
|
|
||||||
$notNull: true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const countParoleWithoutEspagnol = await strapi.entityService.count('api::parole.parole', {
|
|
||||||
filters: {
|
|
||||||
traductions: {
|
|
||||||
espagnol: {
|
|
||||||
$null: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
publishedAt: {
|
|
||||||
$notNull: true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const countParoleWithoutAllemand = await strapi.entityService.count('api::parole.parole', {
|
|
||||||
filters: {
|
|
||||||
traductions: {
|
|
||||||
allemand: {
|
|
||||||
$null: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
publishedAt: {
|
|
||||||
$notNull: true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const countParoleWithoutItalien = await strapi.entityService.count('api::parole.parole', {
|
|
||||||
filters: {
|
|
||||||
traductions: {
|
|
||||||
italien: {
|
|
||||||
$null: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
publishedAt: {
|
|
||||||
$notNull: true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const artistesWithoutBio = await strapi.entityService.count('api::artiste.artiste', {
|
|
||||||
filters: {
|
|
||||||
biographie: {
|
|
||||||
$null: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const parolesWithoutTranslation = {
|
|
||||||
francais: countParoleWithoutFrancais - 1, // -1 Car la transcription d'une parole est déjà en francais (Micajah - Va là-bas)
|
|
||||||
anglais: countParoleWithoutAnglais,
|
|
||||||
espagnol: countParoleWithoutEspagnol,
|
|
||||||
allemand: countParoleWithoutAllemand,
|
|
||||||
italien: countParoleWithoutItalien,
|
|
||||||
}
|
|
||||||
|
|
||||||
return {countArtiste, countParole, artistesWithoutBio, parolesWithoutTranslation}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user