(dependencies): Updated socket.io and socket.io-client to 4.8.2, along with other dependency upgrades

This commit is contained in:
apetitco 2025-12-22 19:39:24 +01:00 committed by Maix0
parent dc62f3a98e
commit 39f71bb4d9

View file

@ -7,7 +7,6 @@ import * as auth from '@shared/auth';
import * as swagger from '@shared/swagger';
import * as utils from '@shared/utils';
import { Server } from 'socket.io';
import type { TicTacToeImpl } from '@shared/database/mixin/tictactoe';
declare const __SERVICE_NAME: string;
@ -78,12 +77,14 @@ async function onReady(fastify: FastifyInstance, game: TTC) {
socket.emit('error', 'Invalid Move');
}
else {
if (result !== 'ongoing') {
fastify.db.setGameOutcome('011001', 'Aless', 'Clara', result);
}
fastify.io.emit('gameState', {
board: game.board,
turn: game.currentPlayer,
lastResult: result,
});
fastify.db.setGameOutcome("011001", result);
}
});