mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-09 04:11:50 +01:00
parent
f135c3192f
commit
41d148fc4c
@ -29,7 +29,11 @@ public class PostHtmlWebAPI extends WebAPI {
|
||||
@Override
|
||||
public Response onRequest(IPlan plugin, Map<String, String> variables) {
|
||||
try {
|
||||
String html = variables.get("html");
|
||||
String htmlVariable = variables.get("html");
|
||||
if (htmlVariable == null) {
|
||||
return badRequest("Html was null");
|
||||
}
|
||||
String html = "<!DOCTYPE html>" + htmlVariable.split("<!DOCTYPE html>", 2)[1];
|
||||
String target = variables.get("target");
|
||||
InformationManager infoManager = plugin.getInfoManager();
|
||||
switch (target) {
|
||||
@ -60,8 +64,8 @@ public class PostHtmlWebAPI extends WebAPI {
|
||||
|
||||
public void sendInspectHtml(String address, UUID uuid, String html) throws WebAPIException {
|
||||
addVariable("uuid", uuid.toString());
|
||||
addVariable("html", html);
|
||||
addVariable("target", "inspectPage");
|
||||
addVariable("html", html);
|
||||
super.sendRequest(address);
|
||||
}
|
||||
|
||||
|
@ -54,6 +54,7 @@ public class WorldPieCreator {
|
||||
}
|
||||
|
||||
private static Map<String, Long> transformToAliases(Map<String, Long> playtimePerWorld) {
|
||||
// TODO Optimization is possible
|
||||
WorldAliasSettings aliasSettings = new WorldAliasSettings(Plan.getInstance());
|
||||
Map<String, String> aliases = aliasSettings.getAliases();
|
||||
|
||||
@ -104,6 +105,7 @@ public class WorldPieCreator {
|
||||
}
|
||||
|
||||
private static Map<String, GMTimes> transformToGMAliases(Map<String, GMTimes> gmTimesMap) {
|
||||
// TODO Optimization is possible
|
||||
WorldAliasSettings aliasSettings = new WorldAliasSettings(Plan.getInstance());
|
||||
Map<String, String> aliases = aliasSettings.getAliases();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user