How to use the @nestjsx/crud.UsePathInterceptors function in @nestjsx/crud

To help you get started, we’ve selected a few @nestjsx/crud examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nestjsx / crud / integration / typeorm / src / companies / companies.controller.ts View on Github external
async getOne(@ParsedQuery() query, @ParsedOptions() options) {
    return this.base.getOneBase(query, options);
  }

  @Override()
  async createOne(@ParsedParams() params, @ParsedBody() body: Company) {
    return this.base.createOneBase(params, body);
  }

  @Override()
  async createMany(@ParsedParams() params, @ParsedBody() body: EntitiesBulk) {
    return this.base.createManyBase(params, body);
  }

  @Get('/custom/get-all')
  @UsePathInterceptors()
  async customRoute(
    @ParsedQuery() query: RestfulParamsDto,
    @ParsedParams() params,
    @ParsedOptions() options: CrudOptions,
  ) {
    return { query, params, options };
  }
}