Replace 'stats' from artiste to new controller 'stats'
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
'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')
|
||||
return {countArtiste, countParole}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
module.exports = {
|
||||
routes: [
|
||||
{
|
||||
method: 'GET',
|
||||
path: '/stats',
|
||||
handler: 'stats.count',
|
||||
config: {
|
||||
auth: false,
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user