From 081df99674d62ce4b42656e5fdc90df130d91826 Mon Sep 17 00:00:00 2001 From: Ethan Davidson <31261035+EthanThatOneKid@users.noreply.github.com> Date: Sun, 1 Oct 2023 15:47:03 -0700 Subject: [PATCH] Revert "Fix leaderboard webhook" This reverts commit f5890dd48d29963ca1ba130ead85ea05296f69e5. --- api/dailies.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/api/dailies.ts b/api/dailies.ts index 2748a6a..9dfa4ab 100644 --- a/api/dailies.ts +++ b/api/dailies.ts @@ -80,12 +80,11 @@ async function executeDailyWebhook( // Get the daily question. const question = await lcClient.getDailyQuestion(); - // Get the season data if a season ID is provided or if it is the beginning - // of a new season. - const isNewSeason = new Date(`${question.date} GMT`).getDay() === 1; + // Get the season data if a season ID is provided or if it is Sunday. + const isSunday = new Date(question.date).getDay() === 0; const season = seasonID ? await leaderboardClient.getSeason(seasonID) - : isNewSeason + : isSunday ? await leaderboardClient.getCurrentSeason() : null;