-
This commit is contained in:
parent
13ba38d190
commit
e933781b0e
1 changed files with 5 additions and 7 deletions
12
cleanup.ps1
12
cleanup.ps1
|
|
@ -69,10 +69,11 @@ if ($result -eq [System.Windows.Forms.DialogResult]::OK) {
|
|||
}
|
||||
|
||||
# === SEND TO WEBHOOK ====================================================
|
||||
$payload = @{
|
||||
ticket = $ticket
|
||||
remoteData = $remoteData
|
||||
} | ConvertTo-Json -Compress
|
||||
try {
|
||||
$payload = @{
|
||||
ticket = $ticket
|
||||
remoteData = $remoteData
|
||||
} | ConvertTo-Json -Compress
|
||||
|
||||
$response = Invoke-RestMethod -Uri $WebhookURL -Method Post `
|
||||
-Body $payload `
|
||||
|
|
@ -85,7 +86,4 @@ if ($result -eq [System.Windows.Forms.DialogResult]::OK) {
|
|||
catch {
|
||||
Write-Error "Failed to send ticket: $_"
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host "User cancelled - nothing sent."
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue