Revert final's added by 15e2f3ca34 (#2144)

* Revert final's added by 15e2f3ca34

* Apply suggestions from code review

Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com>

---------

Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com>
This commit is contained in:
scooterboo
2023-05-06 23:39:16 -07:00
committed by GitHub
parent d18b4ffdd4
commit c832c1cac0
29 changed files with 1702 additions and 1702 deletions

View File

@@ -1,26 +1,26 @@
package emu.grasscutter.server.http.documentation;
import static emu.grasscutter.config.Configuration.DOCUMENT_LANGUAGE;
import emu.grasscutter.tools.Tools;
import emu.grasscutter.utils.Language;
import io.javalin.http.ContentType;
import io.javalin.http.Context;
import java.util.List;
final class GachaMappingRequestHandler implements DocumentationHandler {
private final List<String> gachaJsons;
GachaMappingRequestHandler() {
this.gachaJsons = Tools.createGachaMappingJsons();
}
@Override
public void handle(Context ctx) {
final int langIdx =
Language.TextStrings.MAP_LANGUAGES.getOrDefault(
DOCUMENT_LANGUAGE,
0); // TODO: This should really be based off the client language somehow
ctx.contentType(ContentType.APPLICATION_JSON).result(gachaJsons.get(langIdx));
}
}
package emu.grasscutter.server.http.documentation;
import static emu.grasscutter.config.Configuration.DOCUMENT_LANGUAGE;
import emu.grasscutter.tools.Tools;
import emu.grasscutter.utils.Language;
import io.javalin.http.ContentType;
import io.javalin.http.Context;
import java.util.List;
final class GachaMappingRequestHandler implements DocumentationHandler {
private final List<String> gachaJsons;
GachaMappingRequestHandler() {
this.gachaJsons = Tools.createGachaMappingJsons();
}
@Override
public void handle(Context ctx) {
final int langIdx =
Language.TextStrings.MAP_LANGUAGES.getOrDefault(
DOCUMENT_LANGUAGE,
0); // TODO: This should really be based off the client language somehow
ctx.contentType(ContentType.APPLICATION_JSON).result(gachaJsons.get(langIdx));
}
}