From 67c4865697a9ac0ea647a2dad3cb9571962f94f6 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 29 Oct 2024 14:17:33 +0000 Subject: [PATCH] fix player name --- projects/backend/src/service/score.service.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/projects/backend/src/service/score.service.ts b/projects/backend/src/service/score.service.ts index 2af7963..32e1c8e 100644 --- a/projects/backend/src/service/score.service.ts +++ b/projects/backend/src/service/score.service.ts @@ -189,9 +189,12 @@ export class ScoreService { if (player == undefined) { return; } + // Update player name - player.name = playerName; - await player.save(); + if (playerName !== "Unknown") { + player.name = playerName; + await player.save(); + } // The score has already been tracked, so ignore it. if ( @@ -488,8 +491,6 @@ export class ScoreService { const score = getScoreSaberScoreFromToken(token.score, leaderboard, playerId); if (!score) return undefined; - console.log("boobs"); - // Fetch additional data, previous score, and BeatSaver map concurrently const [additionalData, previousScore, beatSaverMap] = await Promise.all([ this.getAdditionalScoreData(