rztjki
This commit is contained in:
parent
1f16b2472c
commit
939711ef15
4
app.js
4
app.js
@ -18,6 +18,7 @@ const launcherRoutes = require("./routes/launcher");
|
|||||||
const buildingRoutes = require("./routes/buildings");
|
const buildingRoutes = require("./routes/buildings");
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
|
app.set("trust proxy", 1);
|
||||||
const PORT = process.env.PORT || 3000;
|
const PORT = process.env.PORT || 3000;
|
||||||
|
|
||||||
/* ========================
|
/* ========================
|
||||||
@ -104,8 +105,9 @@ app.get("/api/building/:id", async (req, res) => {
|
|||||||
[buildingId],
|
[buildingId],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const buildingInfo = info[0] || {};
|
||||||
res.json({
|
res.json({
|
||||||
name: info[0].name,
|
name: buildingInfo.name || "Gebäude",
|
||||||
level: building.level,
|
level: building.level,
|
||||||
points: building.points,
|
points: building.points,
|
||||||
nextLevelPoints: nextLevel[0]?.required_points || null,
|
nextLevelPoints: nextLevel[0]?.required_points || null,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user