change localdb interface

This commit is contained in:
2023-10-23 22:09:31 +00:00
parent 384e38b760
commit 3146ae76a6
10 changed files with 121 additions and 40 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ router.get("/config/:key", async (req, res) => {
}
const allowKeys = ["resources", "cluster", "nodes"];
if (allowKeys.includes(params.key)) {
const config = db.getUserConfig(req.cookies.username);
const config = db.getUser(req.cookies.username);
res.status(200).send(config[params.key]);
}
else {
@@ -64,7 +64,7 @@ router.get("/iso", async (req, res) => {
return;
}
// get user iso config
const userIsoConfig = db.getGlobalConfig().useriso;
const userIsoConfig = db.getGlobal().useriso;
// get all isos
const isos = (await requestPVE(`/nodes/${userIsoConfig.node}/storage/${userIsoConfig.storage}/content?content=iso`, "GET", { token: pveAPIToken })).data.data;
const userIsos = [];