X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=server%2Froutes%2Fgames.js;h=a86a76ddedce9301a40c44232774252373f45356;hp=21aee475b79a4980f0d8dad06a637de96efba466;hb=584f81b93154313a3856112400b7df98e0eb2632;hpb=da37e2b8639a5c2fa8f10d7a94acb90a7b358647 diff --git a/server/routes/games.js b/server/routes/games.js index 21aee475..a86a76dd 100644 --- a/server/routes/games.js +++ b/server/routes/games.js @@ -12,7 +12,7 @@ router.post("/games", access.logged, access.ajax, (req,res) => { const cid = req.body.cid; if ( Array.isArray(gameInfo.players) && - gameInfo.players.some(p => p.id == req.userId) && + gameInfo.players.some(p => p.uid == req.userId) && (!cid || cid.toString().match(/^[0-9]+$/)) && GameModel.checkGameInfo(gameInfo) ) {