For files like controllers and services,
both these methods seem to work:
module.exports = ({ strapi }) => ({
doSomething: {
strapi.log.info('ok');
}
});
or simply
module.exports = {
doSomething: {
strapi.log.info('ok');
}
};
Is there any benefit in using the function containing strapi
? Is there any downside in using the global strapi
?