From fd57a977128562c4192ff2eeadaa1223d5da5914 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 1 Oct 2024 09:52:36 +0100 Subject: [PATCH] fix last tracked date not being updated --- src/common/player-utils.ts | 1 + src/components/score/score.tsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/player-utils.ts b/src/common/player-utils.ts index 34024f2..475c857 100644 --- a/src/common/player-utils.ts +++ b/src/common/player-utils.ts @@ -111,6 +111,7 @@ export async function trackScoreSaberPlayer(dateToday: Date, foundPlayer: IPlaye history.rank = player.rank; foundPlayer.setStatisticHistory(dateToday, history); foundPlayer.sortStatisticHistory(); + foundPlayer.lastTracked = new Date(); await foundPlayer.save(); io && (await io.logger.info(`Updated statistics for ${foundPlayer.id}`)); diff --git a/src/components/score/score.tsx b/src/components/score/score.tsx index 2abcc5a..1f227b3 100644 --- a/src/components/score/score.tsx +++ b/src/components/score/score.tsx @@ -13,9 +13,9 @@ import ScoreSaberPlayer from "@/common/model/player/impl/scoresaber-player"; type Props = { /** - * The claimed player + * The player who set the score. */ - player: ScoreSaberPlayer; + player?: ScoreSaberPlayer; /** * The score to display.