This commit is contained in:
Cay 2026-03-12 15:08:09 +00:00
parent 1f16b2472c
commit 939711ef15

4
app.js
View File

@ -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,