(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:
apetitco 2025-12-22 19:59:49 +01:00 committed by Maix0
parent f79dc43b39
commit ed2b610f26
2 changed files with 2 additions and 2 deletions

View file

@ -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,