From a73cc53850511bfd98a8860e9fb5850f0c39e0ab Mon Sep 17 00:00:00 2001 From: Yijun Pan Stautland Date: Sun, 6 Nov 2022 19:53:31 +0100 Subject: [PATCH] Add console logs when calculating seasonal winners (#114) --- Firebase/functions/src/api/resetScoreboardsCron.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Firebase/functions/src/api/resetScoreboardsCron.ts b/Firebase/functions/src/api/resetScoreboardsCron.ts index f268ca5..63bd796 100644 --- a/Firebase/functions/src/api/resetScoreboardsCron.ts +++ b/Firebase/functions/src/api/resetScoreboardsCron.ts @@ -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; }