diff --git a/src/@shared/src/database/init.sql b/src/@shared/src/database/init.sql index e416c54..7d9e0df 100644 --- a/src/@shared/src/database/init.sql +++ b/src/@shared/src/database/init.sql @@ -27,7 +27,7 @@ CREATE TABLE IF NOT EXISTS tictactoe ( id INTEGER PRIMARY KEY NOT NULL, player1 TEXT NOT NULL, player2 TEXT NOT NULL, - outcome TEXT NOT NULL, + outcome TEXT NOT NULL -- FOREIGN KEY(player1) REFERENCES user(id) -- FOREIGN KEY(player2) REFERENCES user(id) diff --git a/src/tic-tac-toe/src/app.ts b/src/tic-tac-toe/src/app.ts index 163996a..913255a 100644 --- a/src/tic-tac-toe/src/app.ts +++ b/src/tic-tac-toe/src/app.ts @@ -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,