From cf045e2a498fb47a07d136ed7dd807bd542ad099 Mon Sep 17 00:00:00 2001 From: Colin McDonald Date: Sat, 16 Jul 2016 01:01:20 -0400 Subject: [PATCH] Add gamePrefix field to Ranks --- src/main/java/net/frozenorb/apiv3/model/Rank.java | 4 +++- src/main/java/net/frozenorb/apiv3/route/ranks/POSTRanks.java | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/frozenorb/apiv3/model/Rank.java b/src/main/java/net/frozenorb/apiv3/model/Rank.java index 9574918..ef013f7 100644 --- a/src/main/java/net/frozenorb/apiv3/model/Rank.java +++ b/src/main/java/net/frozenorb/apiv3/model/Rank.java @@ -29,6 +29,7 @@ public final class Rank { @Getter private String inheritsFromId; @Getter private int weight; @Getter private String displayName; + @Getter private String gamePrefix; @Getter private String gameColor; @Getter private String websiteColor; @Getter private boolean staffRank; @@ -66,11 +67,12 @@ public final class Rank { private Rank() {} // For Jackson - public Rank(String id, String inheritsFromId, int weight, String displayName, String gameColor, String websiteColor, boolean staffRank, boolean higherStaffRank) { + public Rank(String id, String inheritsFromId, int weight, String displayName, String gamePrefix, String gameColor, String websiteColor, boolean staffRank, boolean higherStaffRank) { this.id = id; this.inheritsFromId = inheritsFromId; this.weight = weight; this.displayName = displayName; + this.gamePrefix = gamePrefix; this.gameColor = gameColor; this.websiteColor = websiteColor; this.staffRank = staffRank; diff --git a/src/main/java/net/frozenorb/apiv3/route/ranks/POSTRanks.java b/src/main/java/net/frozenorb/apiv3/route/ranks/POSTRanks.java index 69e904a..fa40d59 100644 --- a/src/main/java/net/frozenorb/apiv3/route/ranks/POSTRanks.java +++ b/src/main/java/net/frozenorb/apiv3/route/ranks/POSTRanks.java @@ -20,12 +20,13 @@ public final class POSTRanks implements Handler { String inheritsFromId = requestBody.getString("inheritsFromId"); int weight = requestBody.getInteger("weight"); String displayName = requestBody.getString("displayName"); + String gamePrefix = requestBody.getString("gamePrefix"); String gameColor = requestBody.getString("gameColor"); String websiteColor = requestBody.getString("websiteColor"); boolean staffRank = requestBody.getBoolean("staffRank"); boolean higherStaffRank = requestBody.getBoolean("higherStaffRank"); - Rank rank = new Rank(id, inheritsFromId, weight, displayName, gameColor, websiteColor, staffRank, higherStaffRank); + Rank rank = new Rank(id, inheritsFromId, weight, displayName, gamePrefix, gameColor, websiteColor, staffRank, higherStaffRank); SyncUtils.runBlocking(v -> rank.insert(v)); if (requestBody.containsKey("addedBy")) {