Skip to content

Commit

Permalink
Revert "Fix leaderboard webhook"
Browse files Browse the repository at this point in the history
This reverts commit f5890dd.
  • Loading branch information
EthanThatOneKid committed Oct 1, 2023
1 parent f5890dd commit 081df99
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions api/dailies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 081df99

Please sign in to comment.