I want to override a findOne controller
export default factories.createCoreController(
"api::profile.profile",
({ strapi }) => ({
async findOne(ctx) {
const countForProfile = await strapi
.service("api::profile.profile")
.findOne(ctx.params.id, {
// This should be passed the populate and filters from the request
});
But I want the populate and filter fields to be passed on to the request so that
/api/profile/1?populate=*
still works
How can this be done?
This topic has been created from a Discord post (1216311405800722522) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord