Add count method to artiste & parole

This commit is contained in:
Cédric FAMIBELLE-PRONZOLA
2022-05-22 23:09:19 +04:00
parent ac45f2f5e2
commit 3d3bda6656
4 changed files with 34 additions and 0 deletions
+5
View File
@@ -9,6 +9,11 @@ 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
},
async create(ctx) {
const {body} = ctx.request
let {data} = body