Today I’ve wanted to customize the default controller for my content-type but without success. I have a content type named “notification”, so in src/api/notification/controllers/notification.js I’ve added :
When calling /api/notifications I can see the “in find” log, so it’s working. But I want to make this when creating a notification entry, I tried this :
And when creating a new notification entry from backend (not from API) I never see the “in creation” log… I’ve searched also about webhooks and other things but it do not meet my requirements or not easy to implement.
Hello I have the same problem, did you find some solution?
I know that my extension works, 'cause when I start the proyect I can see this log
export default factories.createCoreController(
"api::order.order",
({ strapi }) => {
strapi.log.debug("Extended controller registred ");
return ({
/* Creating a new order */
async create(ctx) {
strapi.log.debug("I cant see this log and therefore a can do any logic");
},
})
}
);
You need to create the notification using REST API , i.e create it from swagger OR postman API and it’ll hit the Create controller ,
i think you’re probably trying to test using admin panel ( this will not work )