diff --git a/app.js b/app.js index 0819f02..e6bfb95 100644 --- a/app.js +++ b/app.js @@ -111,6 +111,7 @@ app.get("/api/building/:id", async (req, res) => { const buildingInfo = info[0] || {}; res.json({ name: buildingInfo.name || "Gebäude", + type: buildingId, // 👈 DAS HINZUFÜGEN level: building.level, points: building.points, nextLevelPoints: nextLevel[0]?.required_points || null, diff --git a/public/js/map-ui.js b/public/js/map-ui.js index c86346d..ff03d70 100644 --- a/public/js/map-ui.js +++ b/public/js/map-ui.js @@ -4,7 +4,7 @@ const title = document.getElementById("popup-title"); const tooltip = document.getElementById("map-tooltip"); const buildingModules = { - wohnhaus: loadWohnhaus, + 11: loadWohnhaus, }; /* ================================ diff --git a/routes/inventory.js b/routes/inventory.js index a8594ba..b650978 100644 --- a/routes/inventory.js +++ b/routes/inventory.js @@ -1,6 +1,6 @@ const express = require("express"); const router = express.Router(); -const db = require("../db"); +const db = require("../database/database"); router.get("/", async (req, res) => { const userId = 1;