From 211faef1e3955514799aa2a63c6337eca5c3b4a2 Mon Sep 17 00:00:00 2001
From: L4168 <L4168@student.jamk.fi>
Date: Tue, 18 Jun 2019 19:11:00 +0300
Subject: [PATCH] wip json validation

---
 src/game/game.dto.ts | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/game/game.dto.ts b/src/game/game.dto.ts
index 9c5b06d..12bde86 100644
--- a/src/game/game.dto.ts
+++ b/src/game/game.dto.ts
@@ -20,9 +20,12 @@ export class GameDTO {
   @IsNotEmpty()
   @Length(1, 255)
   desc: string;
+  @IsNotEmpty()
+  //@IsJSON()
   center: JSON;
   //@IsJSON()
-  // doesn't accept with IsJSON, WIP to get validation for map
+  // doesn't accept with IsJSON, WIP to get validation for map and center
+  // IsJSON checks with json.parse, expecting string
   map?: JSON;
   @IsDateString()
   @IsNotEmpty()
-- 
GitLab