From e933781b0e1cc32355656c7718c5d42effdcf2c3 Mon Sep 17 00:00:00 2001 From: Joeri Date: Fri, 20 Feb 2026 14:26:22 +0100 Subject: [PATCH] - --- cleanup.ps1 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/cleanup.ps1 b/cleanup.ps1 index 862b5f7..36923c7 100644 --- a/cleanup.ps1 +++ b/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." } \ No newline at end of file