From 0c6fc5ae1fbbc3a49b43214dd1404ea3cbac1ef6 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Mon, 3 Apr 2023 21:53:11 +0000 Subject: [PATCH] fix bug in resource get Signed-off-by: Arthur Lu --- main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 5e75467..8ecb624 100644 --- a/main.js +++ b/main.js @@ -44,13 +44,14 @@ app.post("/api/proxmox/*", async (req, res) => { // proxy endpoint for POST prox }); app.get("/api/user/resources", async(req, res) => { - let auth = await checkAuth(req.cookies, vmpath); + let auth = await checkAuth(req.cookies); if (!auth) { res.status(401).send({auth: auth}); return; } - return getResources(req.cookies.username); + res.status(200).send({resources: getResources(req.cookies.username)}); + return; }); app.post("/api/disk/detach", async (req, res) => {