One call to get stats
This commit is contained in:
@@ -10,9 +10,9 @@ const getSlug = text => {
|
||||
|
||||
module.exports = createCoreController('api::artiste.artiste', ({strapi}) => ({
|
||||
async count(ctx) {
|
||||
const {query} = ctx.request
|
||||
const result = await strapi.entityService.count('api::artiste.artiste', query)
|
||||
return result
|
||||
const countArtiste = await strapi.entityService.count('api::artiste.artiste')
|
||||
const countParole = await strapi.entityService.count('api::parole.parole')
|
||||
return {countArtiste, countParole}
|
||||
},
|
||||
async create(ctx) {
|
||||
const {body} = ctx.request
|
||||
|
||||
Reference in New Issue
Block a user