Skip to content

Commit

Permalink
Fix bug where /api/live-games/ does not always return fen:
Browse files Browse the repository at this point in the history
  • Loading branch information
StanislavNikolov committed Aug 10, 2023
1 parent 266a5c9 commit 31d04c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/arena.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class Arena {
this.board = new Chess(fen);

await this.#prepare();
db.query("UPDATE games SET started = ?1, initial_position = ?2 WHERE id = ?3").run([new Date().toISOString(), fen, this.gameId]);
db.query("UPDATE games SET started = ?1, initial_position = ?2, current_position = ?3 WHERE id = ?4").run([new Date().toISOString(), fen, fen, this.gameId]);
this.#pokeAtTheBotThatIsOnTurn();
}

Expand Down

0 comments on commit 31d04c3

Please sign in to comment.