Don't fetch new scores if the account is inactive or banned.
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m19s

This commit is contained in:
Lee 2024-04-25 20:22:07 +01:00
parent f2f45ffa87
commit 6c63534988

@ -96,6 +96,11 @@ public class AccountService {
account = Account.fromToken(accountToken); account = Account.fromToken(accountToken);
accountRepository.save(account); 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. // Fetch the scores for the account.
scoreSaberService.updateScores(account); scoreSaberService.updateScores(account);