Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Add console logs when calculating seasonal winners (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruswei committed Nov 6, 2022
1 parent e794081 commit a73cc53
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Firebase/functions/src/api/resetScoreboardsCron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,17 @@ const resetScoreboardsFunction = async () => {
for (const team of teams) {
const teamId = team.id;
if (!teamId) {
console.log("TeamId is undefiend");
continue;
}

for (const sport of sports) {
console.log("Calculating seasonal winner");
const seasonWinner = await getLeader(sport, teamId);
if (!seasonWinner) {
console.log(
`No seasonal winner found for ${team.name}, sport: ${sport}`,
);
continue;
}

Expand Down

0 comments on commit a73cc53

Please sign in to comment.