so i am trying to get a custom strapi controller where i want to filter based on CompanyName
module.exports = createCoreController(‘api::partner.partner’, ({strapi}) =>({
async customFind(ctx){
const { query } = ctx.request.query;
const entity = await strapi.service(‘api::partner.partner’).find({query});
return entity
},
and my route is
module.exports={
routes:[
{
method:‘GET’,
path: ‘/search’,
handler: ‘partner.customFind’,
config:{
auth:false,
}
}
]
}
BUt when i am trying
http://localhost:1337/api/partners/search?ComanyName=XYZ
i am getting 404 notfound error
i have the selected find and findone in the role and public