2022-05-23 00:51:59 +04:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
async count(ctx, next) {
|
|
|
|
|
const countArtiste = await strapi.entityService.count('api::artiste.artiste')
|
|
|
|
|
const countParole = await strapi.entityService.count('api::parole.parole')
|
2022-05-25 06:40:50 +04:00
|
|
|
const countParoleWithoutFrancais = await strapi.entityService.count('api::parole.parole', {
|
|
|
|
|
filters: {
|
|
|
|
|
traductions: {
|
|
|
|
|
francais: {
|
|
|
|
|
$null: true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const countParoleWithoutAnglais = await strapi.entityService.count('api::parole.parole', {
|
|
|
|
|
filters: {
|
|
|
|
|
traductions: {
|
|
|
|
|
anglais: {
|
|
|
|
|
$null: true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const countParoleWithoutEspagnol = await strapi.entityService.count('api::parole.parole', {
|
|
|
|
|
filters: {
|
|
|
|
|
traductions: {
|
|
|
|
|
espagnol: {
|
|
|
|
|
$null: true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const countParoleWithoutAllemand = await strapi.entityService.count('api::parole.parole', {
|
|
|
|
|
filters: {
|
|
|
|
|
traductions: {
|
|
|
|
|
allemand: {
|
|
|
|
|
$null: true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const countParoleWithoutItalien = await strapi.entityService.count('api::parole.parole', {
|
|
|
|
|
filters: {
|
|
|
|
|
traductions: {
|
|
|
|
|
italien: {
|
|
|
|
|
$null: 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,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log('artisteWithoutBio', artistesWithoutBio)
|
|
|
|
|
return {countArtiste, countParole, artistesWithoutBio, parolesWithoutTranslation}
|
2022-05-23 00:51:59 +04:00
|
|
|
}
|
|
|
|
|
}
|