From d4e51d1517f93ccf0ea379176a3345a3e49b1acc Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 2 Aug 2024 00:07:13 +0100 Subject: [PATCH] api: rename has logged in field --- API/src/main/java/cc/fascinated/model/user/User.java | 2 +- .../java/cc/fascinated/platform/impl/ScoreSaberPlatform.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/API/src/main/java/cc/fascinated/model/user/User.java b/API/src/main/java/cc/fascinated/model/user/User.java index 0ea68c8..84970ea 100644 --- a/API/src/main/java/cc/fascinated/model/user/User.java +++ b/API/src/main/java/cc/fascinated/model/user/User.java @@ -54,7 +54,7 @@ public class User { *

*/ @JsonIgnore - public boolean hasLoggedIn; + public boolean linkedAccount; /** * The user's ScoreSaber account. diff --git a/API/src/main/java/cc/fascinated/platform/impl/ScoreSaberPlatform.java b/API/src/main/java/cc/fascinated/platform/impl/ScoreSaberPlatform.java index 014b88b..804c5d4 100644 --- a/API/src/main/java/cc/fascinated/platform/impl/ScoreSaberPlatform.java +++ b/API/src/main/java/cc/fascinated/platform/impl/ScoreSaberPlatform.java @@ -139,7 +139,7 @@ public class ScoreSaberPlatform extends Platform { @Override public void updatePlayers() { for (User user : this.userService.getUsers(false)) { - if (!user.isHasLoggedIn()) { // Check if the user has linked their account + if (!user.isLinkedAccount()) { // Check if the user has linked their account continue; } ScoreSaberAccountToken account = scoreSaberService.getAccount(user); // Get the account from the ScoreSaber API @@ -151,6 +151,7 @@ public class ScoreSaberPlatform extends Platform { account.getScoreStats().getAverageRankedAccuracy(), account.getScoreStats().getTotalPlayCount() )); // Add the statistic to the user's history + this.userService.saveUser(user); // Save the user } }