From 939711ef15ec07e0f452bdcf2fa83c966044cf1c Mon Sep 17 00:00:00 2001 From: Cay Date: Thu, 12 Mar 2026 15:08:09 +0000 Subject: [PATCH] rztjki --- app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 42b018b..045d56a 100644 --- a/app.js +++ b/app.js @@ -18,6 +18,7 @@ const launcherRoutes = require("./routes/launcher"); const buildingRoutes = require("./routes/buildings"); const app = express(); +app.set("trust proxy", 1); const PORT = process.env.PORT || 3000; /* ======================== @@ -104,8 +105,9 @@ app.get("/api/building/:id", async (req, res) => { [buildingId], ); + const buildingInfo = info[0] || {}; res.json({ - name: info[0].name, + name: buildingInfo.name || "Gebäude", level: building.level, points: building.points, nextLevelPoints: nextLevel[0]?.required_points || null,