This commit is contained in:
syuilo 2018-03-07 19:03:32 +09:00
parent ec6bc311ab
commit 88d1ac2556

View File

@ -28,6 +28,7 @@ export default function(request: websocket.request, connection: websocket.connec
const game = await Game.findOne({ _id: gameId }); const game = await Game.findOne({ _id: gameId });
if (game.is_ended) return; if (game.is_ended) return;
if (!game.black_user_id.equals(user._id) && !game.white_user_id.equals(user._id)) return;
const o = new Othello(); const o = new Othello();