From 8b8d66ab2e5625bf734dd2ab437f468822a24eb7 Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Tue, 26 Aug 2025 13:44:44 -0700 Subject: [PATCH] chore: add worldState endpoint for U39.1 (#2701) U39.1 wants world state from `/worldState.php` not from `/dynamic/worldState.php` as before. Before bootstrapper update you need to replace `/static/data/buildConfig.json` to match latest version. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2701 Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> --- src/app.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app.ts b/src/app.ts index 971fe210c..b9cca576c 100644 --- a/src/app.ts +++ b/src/app.ts @@ -13,6 +13,8 @@ import { payRouter } from "./routes/pay.ts"; import { statsRouter } from "./routes/stats.ts"; import { webuiRouter } from "./routes/webui.ts"; +import { worldStateController } from "./controllers/dynamic/worldStateController.ts"; + const app = express(); app.use((req, _res, next) => { @@ -45,6 +47,9 @@ app.use("/pay", payRouter); app.use("/stats", statsRouter); app.use("/", webuiRouter); +// U39.1+ gets worldState from that location +app.get("/worldState.php", worldStateController); + app.use(unknownEndpointHandler); app.use(errorHandler);