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

Add console logs when calculating seasonal winners #114

Merged
merged 1 commit into from
Nov 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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