forked from apxtri/apxtri
clean odmdb.js
This commit is contained in:
parent
a2ceae118e
commit
17a1978dd4
@ -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}`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user