diff --git a/API/src/main/java/cc/fascinated/services/UserService.java b/API/src/main/java/cc/fascinated/services/UserService.java index 02e5515..b86e98e 100644 --- a/API/src/main/java/cc/fascinated/services/UserService.java +++ b/API/src/main/java/cc/fascinated/services/UserService.java @@ -5,6 +5,7 @@ import cc.fascinated.exception.impl.BadRequestException; import cc.fascinated.model.token.ScoreSaberAccountToken; import cc.fascinated.model.user.ScoreSaberAccount; import cc.fascinated.model.user.User; +import cc.fascinated.model.user.history.HistoryPoint; import cc.fascinated.repository.UserRepository; import lombok.NonNull; import lombok.extern.log4j.Log4j2; @@ -80,6 +81,11 @@ public class UserService { ScoreSaberAccountToken accountToken = scoreSaberService.getAccount(user); user.setScoresaberAccount(ScoreSaberAccount.getFromToken(accountToken)); // Update the ScoreSaber account user.setUsername(accountToken.getName()); // Update the username + + HistoryPoint historyToday = user.getHistory().getTodayHistory(); + historyToday.setRank(accountToken.getRank()); + historyToday.setCountryRank(accountToken.getCountryRank()); + historyToday.setPp(accountToken.getPp()); } catch (Exception ex) { log.error("Failed to update ScoreSaber account for '{}'", steamId, ex); }