Skip to content

Commit

Permalink
[BE] Feat : validation provider 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
koomin1227 committed Nov 21, 2023
1 parent f8e7d01 commit c45f32f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions BE/src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Module, Logger } from '@nestjs/common';
import { Module, Logger, ValidationPipe } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { TypeOrmModule } from '@nestjs/typeorm';
import { WinstonModule } from 'nest-winston';
Expand All @@ -9,6 +9,7 @@ import { AppService } from './app.service';
import { winstonOptions, dailyOption } from './config/winston.config';
import { MysqlConfigProvider } from './config/mysql.config';
import { PostModule } from './post/post.module';
import { APP_PIPE } from '@nestjs/core';

@Module({
imports: [
Expand All @@ -25,6 +26,13 @@ import { PostModule } from './post/post.module';
PostModule,
],
controllers: [AppController],
providers: [AppService, Logger],
providers: [
AppService,
Logger,
{
provide: APP_PIPE,
useClass: ValidationPipe,
},
],
})
export class AppModule {}

0 comments on commit c45f32f

Please sign in to comment.