major rework of backend loading and usage:

- split config from user data to config.json, add config.hson.template
- moved default user data localdb to root folder
- moved pve, localdb, ldap backend handlers to backends sub folder
- add dynamic loading of all backends
- add dynamic mapping for auth backends to support multiple auth sources
- update affected endpoints
This commit is contained in:
alu
2024-01-06 22:36:18 +00:00
parent 7b0549e052
commit a0109d3546
21 changed files with 629 additions and 674 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
import { Router } from "express";
export const router = Router({ mergeParams: true });
const db = global.db;
const checkAuth = global.utils.checkAuth;
/**
@@ -20,7 +19,7 @@ router.get("/config/:key", async (req, res) => {
}
const allowKeys = ["resources"];
if (allowKeys.includes(params.key)) {
const config = db.getGlobal();
const config = global.config;
res.status(200).send(config[params.key]);
}
else {