fix handleResponse responding with proxmox task status
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
parent
2936d39368
commit
78377c0479
2
pve.js
2
pve.js
@ -35,7 +35,7 @@ export async function requestPVE(path, method, cookies, body = null, token = nul
|
||||
|
||||
export async function handleResponse(node, result, res) {
|
||||
const waitFor = delay => new Promise(resolve => setTimeout(resolve, delay));
|
||||
if (result.data.data && typeof(result.data.data) === String && result.data.data.startsWith("UPID:")) {
|
||||
if (result.data.data && typeof(result.data.data) === "string" && result.data.data.startsWith("UPID:")) {
|
||||
let upid = result.data.data;
|
||||
while (true) {
|
||||
let taskStatus = await requestPVE(`/nodes/${node}/tasks/${upid}/status`, "GET", null, null, pveAPIToken);
|
||||
|
Loading…
Reference in New Issue
Block a user