Skip to content

Commit

Permalink
fix validation pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
bahram1249 committed May 6, 2024
1 parent 5a156a2 commit 3ba39cd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/main/src/routes/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ import * as session from 'express-session';
import { DynamicProviderModule } from '../dynamic-provider/dynamic-provider.module';
import { ThrottlerBehindProxyGuard } from '@rahino/commontools/guard';
import { APP_GUARD } from '@nestjs/core';
import { AcceptLanguageResolver, I18nModule, QueryResolver } from 'nestjs-i18n';
import {
AcceptLanguageResolver,
I18nModule,
I18nValidationPipe,
QueryResolver,
} from 'nestjs-i18n';
import * as path from 'path';
import { AppLanguageResolver } from '../i18nResolver/AppLanguageResolver';

Expand Down Expand Up @@ -118,6 +123,7 @@ export class AppModule implements NestModule {
app.useGlobalFilters(new HttpExceptionFilter(this.logger));

app.useGlobalPipes(
new I18nValidationPipe(),
new ValidationPipe({
whitelist: true,
transform: true,
Expand Down

0 comments on commit 3ba39cd

Please sign in to comment.