File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -166,4 +166,22 @@ export class TestSecuredController {
166
166
## Adding the entities to your TypeORM configuration
167
167
168
168
** IMPORTANT** : The module comes with entities you have to add the configuration ` node_modules/@switchit/**/*.entity.js `
169
- to let typeorm scan your entities or add them to the ` entitie ` configuration variable in TypeORM.
169
+ to let typeorm scan your entities or add them to the ` entitie ` configuration variable in TypeORM.
170
+
171
+ ## Using the global validation pipes
172
+
173
+ ** IMPORTANT** : In addition, you should enable the global validation pipe in your NestJS application. In your ` main.ts `
174
+ you should add these lines:
175
+
176
+ ``` typescript
177
+ async function bootstrap() {
178
+ const app = await NestFactory .create (AppModule );
179
+ useContainer (app .select (AppModule ), {fallbackOnErrors: true });
180
+ app .useGlobalPipes (new ValidationPipe ({
181
+ transform: true ,
182
+ }));
183
+
184
+ await app .listen (3000 );
185
+ }
186
+ bootstrap ();
187
+ ```
You can’t perform that action at this time.
0 commit comments