From ecf9e6ea79fa5a79f7d33f5625351f65928a7f83 Mon Sep 17 00:00:00 2001 From: L4168 <L4168@student.jamk.fi> Date: Thu, 4 Jul 2019 13:12:19 +0300 Subject: [PATCH] added optional factionId --- src/faction/faction.dto.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/faction/faction.dto.ts b/src/faction/faction.dto.ts index a5b9f04..0b65c47 100644 --- a/src/faction/faction.dto.ts +++ b/src/faction/faction.dto.ts @@ -7,14 +7,18 @@ import { IsNumber, Min, Max, + IsOptional, } from 'class-validator'; import { GameEntity } from '../game/game.entity'; -import { RoleValidation } from '../shared/custom-validation'; +import { RoleValidation, Uuid } from '../shared/custom-validation'; import { GameDTO } from '../game/game.dto'; import { FactionEntity, GameGroupEntity } from './faction.entity'; export class FactionDTO { + @IsOptional() + @IsUUID('4') + factionId?: string; @IsString() @IsNotEmpty() @Length(2, 31) -- GitLab