From 50d1e0d90ed06bf5d62dcb1bb29a0e518e0d4360 Mon Sep 17 00:00:00 2001 From: Eric Richardson Date: Thu, 8 Aug 2024 14:20:41 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20cdd=20not=20created=20wit?= =?UTF-8?q?h=20/identities/register?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `createCdd` would always be false, even when specified in the request. Adds a decorator to DTO param so `createCdd` is parsed properly --- src/identities/dto/register-identity.dto.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/identities/dto/register-identity.dto.ts b/src/identities/dto/register-identity.dto.ts index a35df8ba..00caecf1 100644 --- a/src/identities/dto/register-identity.dto.ts +++ b/src/identities/dto/register-identity.dto.ts @@ -2,7 +2,7 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { Type } from 'class-transformer'; -import { IsDate, IsOptional, IsString, ValidateNested } from 'class-validator'; +import { IsBoolean, IsDate, IsOptional, IsString, ValidateNested } from 'class-validator'; import { PermissionedAccountDto } from '~/accounts/dto/permissioned-account.dto'; import { TransactionBaseDto } from '~/common/dto/transaction-base-dto'; @@ -31,6 +31,7 @@ export class RegisterIdentityDto extends TransactionBaseDto { type: 'boolean', example: false, }) + @IsBoolean() readonly createCdd: boolean; @ApiPropertyOptional({