diff --git a/routes/odmdb.js b/routes/odmdb.js index 259bbd6..93a2391 100644 --- a/routes/odmdb.js +++ b/routes/odmdb.js @@ -24,7 +24,7 @@ const router = express.Router(); */ router.get("/objects", checkHeaders, isAuthenticated, (req, res) => { const data = { - tribe: req.session.headers.xtribe, + tribe: req.session.header.xtribe, apx: { conf: {}, objectnames: [] }, tribe: { conf: {}, objectnames: [] }, }; @@ -37,7 +37,7 @@ router.get("/objects", checkHeaders, isAuthenticated, (req, res) => { } }); glob - .sync(`../nationchains/tribes/${req.session.headers.xtribe}/schema/*.json`) + .sync(`../nationchains/tribes/${req.session.header.xtribe}/schema/*.json`) .forEach((f) => { const objectname = path.basename(f, ".json"); if (objectname == "conf") { @@ -80,7 +80,7 @@ router.get( // indexname = objectname_key_value.json let objectLocation = "../nationchains/"; if (!conf.api.nationObjects.includes(req.params.objectname)) { - objectLocation += `tribes/${req.session.headers.xtribe}/`; + objectLocation += `tribes/${req.session.header.xtribe}/`; // check if accessright } const indexpath = `${objectLocation}/${req.params.objectname}/idx/${req.params.indexname}`;