Hello everyone, how are you?
I have a problem when creating custom controllers in strapi, I set up my project in JS, and when I want to configure custom endpoints I find that the parameters that I get in ctx are unknown.
Does anyone know what to do in this situation?
module.exports = createCoreController('api:example.Example', ({strapi}) =>({
async customAction (ctx) {
try {
ctx.body.paramExample;
} catch (error) {
ctx.body = error;
}
}
}));
//This is the VSCode message
//The property 'paramExample' does not exist in type 'unknown'.ts(2339)
//any