fix bug in /api/user

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
Arthur Lu 2023-04-24 21:34:30 +00:00
parent 02dbd0dec7
commit 99814f5c80

View File

@ -46,7 +46,7 @@ app.post("/api/proxmox/*", async (req, res) => { // proxy endpoint for POST prox
app.get("/api/user", async(req, res) => { app.get("/api/user", async(req, res) => {
// check auth // check auth
await checkAuth(req.cookies, res); 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(); res.end();
return; return;
}); });