Fix bug regarding date formatting in games.js

main
sudoer777 2021-11-21 17:41:45 -07:00
parent 344e8b66d3
commit 49aff3f741
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ async function add(divisionID, seasonID, date, team1ID, team2ID, team1Score, tea
VALUES($1, $2, $3, $4, $5, $6, $7)
RETURNING game_id;`;
const dateISO = date.format(YYYY-MM-DD);
const dateISO = date.format('YYYY-MM-DD');
const id = (await database.executeQuery(query, [divisionID, seasonID, dateISO, team1ID, team2ID, team1Score, team2Score]))[0][0];
return new Game(id, date, team1ID, team2ID, team1Score, team2Score);