How to enable createMany in a content type inside a plugin

System Information
  • Strapi Version:
  • Operating System:
  • Database:
  • Node Version:
  • NPM Version:
  • Yarn Version:

Hi, i already enabled the one time routes, controllers and services. I’m working on a content type inside a plugin and when generating the content type allowed to generate the bootstrap.

Example of a controller:

async create(ctx) {
    const response = await super.create(ctx);

    return response;
  },

Now i want to create many at one time. Can i simply create the createMan function? Or i need to work around, like check what comes if in the body comes an array or not?

Already understood how to do.
I made a workaround, created the route, and this is the controller:

  async createMany(ctx){//É preciso fazer harcode, fazer db.query.createMany
    let body = ctx.request.body;

    const response = await strapi.db.query('plugin::rc.channel').createMany({data: body.data})

    return response;
  },

With the strapi.db.query strapi actually uses the lifecycles hooks. So you can put the code in the lifecycle.