Fixed improper replacement

PlayerPageExporter was exporting player json file to player%3Duuid.json
but browser parsed that to be file player=uuid.json, leading to the
player page not loading the value

This was because copy-pasting the PageExporter from Server page missed
server= being replaced, while player= was supposed to be replaced.

Fixed by changing server= to player=

Affects issues:
- Fixed #1223
This commit is contained in:
Rsl1122 2019-11-14 19:03:05 +02:00
parent eda40a4ade
commit c8a97ebca8

View File

@ -119,7 +119,7 @@ public class PlayerPageExporter extends FileExporter {
}
private String toJSONResourceName(String resource) {
return StringUtils.replaceEach(resource, new String[]{"?", "&", "type=", "server="}, new String[]{"-", "_", "", ""});
return StringUtils.replaceEach(resource, new String[]{"?", "&", "type=", "player="}, new String[]{"-", "_", "", ""});
}
private Response getJSONResponse(String resource) {