(tic-tac-toe): Fixed the issue, game now correctly writes into database. Need to implement generation of random IDs for games and fetch users' UID
This commit is contained in:
parent
f79dc43b39
commit
ed2b610f26
2 changed files with 2 additions and 2 deletions
|
|
@ -78,7 +78,7 @@ async function onReady(fastify: FastifyInstance, game: TTC) {
|
|||
}
|
||||
else {
|
||||
if (result !== 'ongoing') {
|
||||
fastify.db.setGameOutcome('011001', 'Aless', 'Clara', result);
|
||||
fastify.db.setGameOutcome('011001', 'player1', 'player2', result);
|
||||
}
|
||||
fastify.io.emit('gameState', {
|
||||
board: game.board,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue