diff --git a/src/main.ts b/src/main.ts index dbd2632..90d3aaf 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,8 +1,14 @@ import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; +import { ValidationPipe } from "@nestjs/common"; async function bootstrap() { const app = await NestFactory.create(AppModule); + app.useGlobalPipes( + new ValidationPipe({ + whitelist: true, + }), + ); await app.listen(3333); } bootstrap();