simplify requestPVE args

This commit is contained in:
2023-09-12 19:16:19 +00:00
parent 8912ae5f3c
commit 40f36270aa
10 changed files with 66 additions and 60 deletions

View File

@@ -24,11 +24,11 @@ export async function checkAuth (cookies, res, vmpath = null) {
}
if (vmpath) {
const result = await requestPVE(`/${vmpath}/config`, "GET", cookies);
const result = await requestPVE(`/${vmpath}/config`, "GET", { cookies });
auth = result.status === 200;
}
else { // if no path is specified, then do a simple authentication
const result = await requestPVE("/version", "GET", cookies);
const result = await requestPVE("/version", "GET", { cookies });
auth = result.status === 200;
}