and would like to pass parametars to my script “MyScript” i would like to call “http://localhost:1340/MyScript/get?par0=1313&par1=1231&par2=3134”
and be able to get values of par0, par1, par2 in controller. but every time i get is 403 return.
route is allowed in strapi settings.
does anyone know something about or have done anything?
For starters we should try to fix the 403 status code. It means you are not allowed to access the route. You can change that in the permissions for your role.
See the docs on how to do that:
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,
}
}
]
}