From 99814f5c807a219af23af770427a045fe550363b Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Mon, 24 Apr 2023 21:34:30 +0000 Subject: [PATCH] fix bug in /api/user Signed-off-by: Arthur Lu --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 3b8569c..07bcea5 100644 --- a/main.js +++ b/main.js @@ -46,7 +46,7 @@ app.post("/api/proxmox/*", async (req, res) => { // proxy endpoint for POST prox app.get("/api/user", async(req, res) => { // check auth await checkAuth(req.cookies, res); - res.status(200).send(await getUserData(req, req.body.username)); + res.status(200).send(await getUserData(req, req.cookies.username)); res.end(); return; });