From df2ae7bbfec1744ce486b3325529849bf8555746 Mon Sep 17 00:00:00 2001 From: Ronnie Friman <L4168@student.jamk.fi> Date: Tue, 23 Jul 2019 06:46:48 +0300 Subject: [PATCH] add image to newGameDTO --- src/game/game.dto.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/game/game.dto.ts b/src/game/game.dto.ts index 1809314..081a9ae 100644 --- a/src/game/game.dto.ts +++ b/src/game/game.dto.ts @@ -62,15 +62,17 @@ export class newGameDTO { @IsNotEmpty() @Length(1, 255) desc: string; - @IsNotEmpty() - @Validate(CenterJSON) - center: JSON; + @ValidateNested() + @Type(() => CenterDTO) + center: CenterDTO; @IsDateString() @IsNotEmpty() startdate: string; @IsDateString() @IsNotEmpty() enddate: string; + @Length(0, 65) + image: string; } export class GameStateDTO { -- GitLab