Update SVSTaskGate.ps1
This commit is contained in:
@@ -715,19 +715,7 @@ function GetHtmlContent {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ installRMMCommand, UID, Name })
|
body: JSON.stringify({ installRMMCommand, UID, Name })
|
||||||
})
|
|
||||||
.then(response => {
|
|
||||||
if (!response.ok) {
|
|
||||||
appendLog(`Error: ${response.statusText}`, "red");
|
|
||||||
throw new Error(`Server responded with status ${response.status}`);
|
|
||||||
}
|
|
||||||
return response.text();
|
|
||||||
})
|
|
||||||
.then(data => {
|
|
||||||
appendLog(`Response: ${data}`, "green");
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
appendLog(`Fetch error: ${error.message}`, "red");
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user