fix bug in resource get
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
parent
8862144524
commit
0c6fc5ae1f
5
main.js
5
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) => {
|
app.get("/api/user/resources", async(req, res) => {
|
||||||
let auth = await checkAuth(req.cookies, vmpath);
|
let auth = await checkAuth(req.cookies);
|
||||||
if (!auth) {
|
if (!auth) {
|
||||||
res.status(401).send({auth: auth});
|
res.status(401).send({auth: auth});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
return getResources(req.cookies.username);
|
res.status(200).send({resources: getResources(req.cookies.username)});
|
||||||
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
app.post("/api/disk/detach", async (req, res) => {
|
app.post("/api/disk/detach", async (req, res) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user