X-Git-Url: https://git.auder.net/doc/screen_ranking.png?a=blobdiff_plain;f=server%2Fmodels%2FGame.js;h=4d06e48d38665eafc0a3f6db793bc97329da67f9;hb=89ffc919a31cc1cd24beadc63050d9097e7505f7;hp=2e3303115b5527164264a326e4e1a579832c747b;hpb=0baae6b9fd3536d674f35c704bd5571362798b4c;p=vchess.git 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) {