diff options
Diffstat (limited to 'database/games.js')
-rw-r--r-- | database/games.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/database/games.js b/database/games.js index 3517d0a..ac9a4ad 100644 --- a/database/games.js +++ b/database/games.js @@ -1,8 +1,8 @@ -import db from "./db.js"; +import db from './db.js'; -const getGameStatement = db.prepare("SELECT * from games where id = ?;"); -const listGamesStatement = db.prepare("SELECT * from games where player1 = ?1 OR player2 = ?1 ORDER BY last_move_at;"); -const newGameStatement = db.prepare("INSERT INTO games (player1, player2, data) VALUES (?, ?, ?);"); +const getGameStatement = db.prepare('SELECT * from games where id = ?;'); +const listGamesStatement = db.prepare('SELECT * from games where player1 = ?1 OR player2 = ?1 ORDER BY last_move_at;'); +const newGameStatement = db.prepare('INSERT INTO games (player1, player2, data) VALUES (?, ?, ?);'); export function getGame(id) { try { |