System Information
- Strapi Version: 4.1.7
- Operating System: Ubuntu
- Database: MySQL
- Node Version: 16.2.0
- NPM Version: 7.20.1
- Yarn Version: 1.22.17
According to the developer docs, when extending a service you can use await super.find(params)
to call the database before modifying the response. However, when I do this the response from that method is undefined
.
My code is as follows, any pointers are greatly received!
module.exports = createCoreService('api::project.project', ({ strapi }) => ({
async find(...args) {
let params = args[0],
results = []
// don't care about params, fetch all projects
const { projects, pagination } = await super.find([]);
// this line prints undefined
console.log(projects)
}))