From 89ffc919a31cc1cd24beadc63050d9097e7505f7 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Thu, 5 Mar 2020 00:00:18 +0100
Subject: [PATCH] Add debug trace to understand why corr move 1 isn't recorded

---
 server/models/Game.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/models/Game.js b/server/models/Game.js
index 2e330311..4d06e48d 100644
--- a/server/models/Game.js
+++ b/server/models/Game.js
@@ -244,11 +244,11 @@ const GameModel =
       }
 
 
-return cb({errmsg: JSON.stringify(obj.move)});
+//return cb({errmsg: JSON.stringify(obj.move)});
 
 
       // NOTE: move, chat and delchat are mutually exclusive
-      if (obj.move)
+      if (!!obj.move)
       {
         // Security: only update moves if index is right
         query =
@@ -258,7 +258,7 @@ return cb({errmsg: JSON.stringify(obj.move)});
         db.get(query, (err,ret) => {
           const m = obj.move;
 
-return cb({errmsg: ret.maxIdx + " " + m.idx + " " + (!ret.maxIdx || ret.maxIdx + 1 == m.idx) + " " + query});
+//return cb({errmsg: ret.maxIdx + " " + m.idx + " " + (!ret.maxIdx || ret.maxIdx + 1 == m.idx) + " " + query});
 
 
           if (!ret.maxIdx || ret.maxIdx + 1 == m.idx) {
-- 
2.44.0