From 74f23bcb621d3440abc8917c8b8af161711ae27a Mon Sep 17 00:00:00 2001 From: Colin McDonald Date: Sun, 26 Jun 2016 23:27:36 -0400 Subject: [PATCH] Remove user field (not used) and bestRank field (will be assumed by the client) from login info --- src/main/java/net/frozenorb/apiv3/model/User.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/frozenorb/apiv3/model/User.java b/src/main/java/net/frozenorb/apiv3/model/User.java index e312755..b4594f0 100644 --- a/src/main/java/net/frozenorb/apiv3/model/User.java +++ b/src/main/java/net/frozenorb/apiv3/model/User.java @@ -262,8 +262,10 @@ public final class User { Map result = new HashMap<>(); List ranks = getRanksScoped(serverGroup, grants); - result.put("user", this); - result.put("bestRank", ranks.get(0).getId()); + // Currently, we exclude this from login info. We do still do the relevant + // db query, but we don't include the result because it's not used in + // Hydrogen at all (bnut probably will be later on) + // result.put("user", this); result.put("ranks", ranks.stream().map(Rank::getId).collect(Collectors.toList())); if (activeMute != null) {