This commit is contained in:
Joeri 2026-02-20 14:26:22 +01:00
parent 13ba38d190
commit e933781b0e

View file

@ -69,10 +69,11 @@ if ($result -eq [System.Windows.Forms.DialogResult]::OK) {
} }
# === SEND TO WEBHOOK ==================================================== # === SEND TO WEBHOOK ====================================================
$payload = @{ try {
ticket = $ticket $payload = @{
remoteData = $remoteData ticket = $ticket
} | ConvertTo-Json -Compress remoteData = $remoteData
} | ConvertTo-Json -Compress
$response = Invoke-RestMethod -Uri $WebhookURL -Method Post ` $response = Invoke-RestMethod -Uri $WebhookURL -Method Post `
-Body $payload ` -Body $payload `
@ -85,7 +86,4 @@ if ($result -eq [System.Windows.Forms.DialogResult]::OK) {
catch { catch {
Write-Error "Failed to send ticket: $_" Write-Error "Failed to send ticket: $_"
} }
}
else {
Write-Host "User cancelled - nothing sent."
} }