Add gamePrefix field to Ranks

This commit is contained in:
Colin McDonald 2016-07-16 01:01:20 -04:00
parent 8f7f19035f
commit cf045e2a49
2 changed files with 5 additions and 2 deletions

View File

@ -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;

View File

@ -20,12 +20,13 @@ public final class POSTRanks implements Handler<RoutingContext> {
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.<Void>runBlocking(v -> rank.insert(v));
if (requestBody.containsKey("addedBy")) {