From 3a216bf1bb8f0b9bf255d9a047dc34a0f1859c2a Mon Sep 17 00:00:00 2001
From: Hotaru <105128850+HotaruYS@users.noreply.github.com>
Date: Sun, 15 May 2022 03:24:34 +0200
Subject: [PATCH] Move gacha files to separate directory and refactor file
serving
---
.../details.html} | 2 +-
.../records.html} | 19 +++--
.../server/http/handlers/GachaHandler.java | 84 +++++++++++--------
src/main/resources/languages/en-US.json | 3 +-
src/main/resources/languages/pl-PL.json | 3 +-
src/main/resources/languages/zh-CN.json | 3 +-
src/main/resources/languages/zh-TW.json | 3 +-
7 files changed, 63 insertions(+), 54 deletions(-)
rename data/{gacha_details.html => gacha/details.html} (98%)
rename data/{gacha_records.html => gacha/records.html} (94%)
diff --git a/data/gacha_details.html b/data/gacha/details.html
similarity index 98%
rename from data/gacha_details.html
rename to data/gacha/details.html
index ccd775ef6..85443d532 100644
--- a/data/gacha_details.html
+++ b/data/gacha/details.html
@@ -84,7 +84,7 @@
var fiveStarItems = {{FIVE_STARS}};
var fourStarItems = {{FOUR_STARS}};
var threeStarItems = {{THREE_STARS}};
- var lang = "{{LANGUAGE}}";
+ var lang = "{{LANGUAGE}}".toLowerCase();
function getNameForId(itemId) {
if (mappings[lang] != null && mappings[lang][itemId] != null) {
diff --git a/data/gacha_records.html b/data/gacha/records.html
similarity index 94%
rename from data/gacha_records.html
rename to data/gacha/records.html
index 7bea40f61..cad1c89d5 100644
--- a/data/gacha_records.html
+++ b/data/gacha/records.html
@@ -58,7 +58,7 @@