From 6c63534988fb1a0c96632090b81e3519bf277b45 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 25 Apr 2024 20:22:07 +0100 Subject: [PATCH] Don't fetch new scores if the account is inactive or banned. --- .../java/cc/fascinated/backend/service/AccountService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/cc/fascinated/backend/service/AccountService.java b/src/main/java/cc/fascinated/backend/service/AccountService.java index a90d3e5..6265b1a 100644 --- a/src/main/java/cc/fascinated/backend/service/AccountService.java +++ b/src/main/java/cc/fascinated/backend/service/AccountService.java @@ -96,6 +96,11 @@ public class AccountService { account = Account.fromToken(accountToken); accountRepository.save(account); + // Don't fetch new scores if the account is inactive or banned. + if (account.isInactive() || account.isBanned()) { + return account; + } + // Fetch the scores for the account. scoreSaberService.updateScores(account);