nestjsx / crud

NestJs CRUD for RESTful APIs
https://github.com/nestjsx/crud/wiki
MIT License
4.06k stars 538 forks source link

Exclude 'createManyBase' is not working #801

Open davilopez90 opened 2 years ago

davilopez90 commented 2 years ago

Bug Report

Current behavior

I'm running Nestjsx on a Nest.js project, as I've done in many others. But I'm not sure which library or version is breaking this, but the exclude 'createManyBase' is not working anymore, and the bulk endpoint is being exposed anyway.

Input Code

As always, I'm running this line in the main.ts:

CrudConfigService.load(CRUD_CONFIG);

This is my CRUD_CONFIG contant:

const CRUD_CONFIG: CrudGlobalConfig = {
    query: {
        maxLimit: ApiConfig.CRUD_CONFIG_MAX_LIMIT,
        cache: ApiConfig.CRUD_CONFIG_CACHE
    },
    routes: {
        exclude: ["createManyBase"]
    }
};

image

Expected behavior

The createMany endpoints should never be created.

Possible Solution

Not sure

Environment

    "@nestjs/swagger": "^6.0.4",
    "@nestjs/typeorm": "^9.0.0",
    "@nestjsx/crud": "^4.6.2",
    "@nestjsx/crud-typeorm": "^4.6.2",
    "ts-node": "^10.0.0",

Am I doing anything wrong? It has changed this since older versions? This is actually working for me but with olders versions (these ones): "@nestjs/swagger": "^4.7.8", "@nestjs/typeorm": "^7.1.5", "@nestjsx/crud": "^4.6.2", "@nestjsx/crud-typeorm": "^4.6.2", "ts-node": "^9.1.1",