Commit 2fd6fb37 authored by Diego Iván's avatar Diego Iván
Browse files

agregando pipes para la validacion de datos

parent 5584b5ba
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2,9 +2,15 @@ import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
import { ServerConstants } from './constants/server.contants';
import { ValidationPipe } from '@nestjs/common';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  app.useGlobalPipes(
    new ValidationPipe({
      transform: true,
    }),
  );
  const config = new DocumentBuilder()
    .setTitle('Pueblos Magicos API')
    .setVersion('1.0')