From 8587212af921870075817c9ee08e3e252b6842af Mon Sep 17 00:00:00 2001 From: sudoer777 <78781902+sudoer777@users.noreply.github.com> Date: Mon, 22 Nov 2021 17:45:58 -0700 Subject: [PATCH] Fix bug where games.js uses nonexistent moment.js module for formatting --- database/scores/games.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/database/scores/games.js b/database/scores/games.js index 4055523..922d600 100644 --- a/database/scores/games.js +++ b/database/scores/games.js @@ -23,10 +23,8 @@ async function add(divisionID, seasonID, date, team1ID, team2ID, team1Score, tea const query = `INSERT INTO scores.games(division_id, season_id, game_date, team1_id, team2_id, team1_score, team2_score) VALUES($1, $2, $3, $4, $5, $6, $7) RETURNING game_id;`; - - const dateISO = date.format('YYYY-MM-DD'); - const id = (await database.executeQuery(query, [divisionID, seasonID, dateISO, team1ID, team2ID, team1Score, team2Score]))[0][0]; + const id = (await database.executeQuery(query, [divisionID, seasonID, date, team1ID, team2ID, team1Score, team2Score]))[0][0]; return new Game(id, date, team1ID, team2ID, team1Score, team2Score); }