Fix bug where games.js uses nonexistent moment.js module for formatting
parent
722bb4fce6
commit
8587212af9
|
@ -24,9 +24,7 @@ async function add(divisionID, seasonID, date, team1ID, team2ID, team1Score, tea
|
||||||
VALUES($1, $2, $3, $4, $5, $6, $7)
|
VALUES($1, $2, $3, $4, $5, $6, $7)
|
||||||
RETURNING game_id;`;
|
RETURNING game_id;`;
|
||||||
|
|
||||||
const dateISO = date.format('YYYY-MM-DD');
|
const id = (await database.executeQuery(query, [divisionID, seasonID, date, team1ID, team2ID, team1Score, team2Score]))[0][0];
|
||||||
|
|
||||||
const id = (await database.executeQuery(query, [divisionID, seasonID, dateISO, team1ID, team2ID, team1Score, team2Score]))[0][0];
|
|
||||||
return new Game(id, date, team1ID, team2ID, team1Score, team2Score);
|
return new Game(id, date, team1ID, team2ID, team1Score, team2Score);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue