@@ -22,16 +22,16 @@ function Invoke-ExecSnoozeAlert {
2222
2323 if ([string ]::IsNullOrWhiteSpace($CmdletName ) -or [string ]::IsNullOrWhiteSpace($TenantFilter ) -or $null -eq $AlertItem ) {
2424 return ([HttpResponseContext ]@ {
25- StatusCode = [HttpStatusCode ]::BadRequest
26- Body = @ { Results = ' CmdletName, TenantFilter, and AlertItem are required.' }
27- })
25+ StatusCode = [HttpStatusCode ]::BadRequest
26+ Body = @ { Results = ' CmdletName, TenantFilter, and AlertItem are required.' }
27+ })
2828 }
2929
3030 if ($Duration -notin @ (7 , 14 , 30 , -1 )) {
3131 return ([HttpResponseContext ]@ {
32- StatusCode = [HttpStatusCode ]::BadRequest
33- Body = @ { Results = ' Duration must be 7, 14, 30, or -1 (forever).' }
34- })
32+ StatusCode = [HttpStatusCode ]::BadRequest
33+ Body = @ { Results = ' Duration must be 7, 14, 30, or -1 (forever).' }
34+ })
3535 }
3636
3737 # Compute content hash for this alert item
@@ -67,20 +67,20 @@ function Invoke-ExecSnoozeAlert {
6767 Write-LogMessage - headers $Headers - API $APIName - message $Result - Sev ' Info' - tenant $TenantFilter
6868
6969 return ([HttpResponseContext ]@ {
70- StatusCode = [HttpStatusCode ]::OK
71- Body = @ {
72- Results = $Result
73- ContentHash = $HashResult.ContentHash
74- SnoozeUntil = $SnoozeUntil
75- SnoozedBy = $SnoozedBy
76- }
77- })
70+ StatusCode = [HttpStatusCode ]::OK
71+ Body = @ {
72+ Results = $Result
73+ ContentHash = $HashResult.ContentHash
74+ SnoozeUntil = $SnoozeUntil
75+ SnoozedBy = $SnoozedBy
76+ }
77+ })
7878 } catch {
7979 $ErrorMessage = Get-CippException - Exception $_
8080 Write-LogMessage - headers $Headers - API $APIName - message " Failed to snooze alert: $ ( $ErrorMessage.NormalizedError ) " - Sev ' Error' - tenant $TenantFilter
8181 return ([HttpResponseContext ]@ {
82- StatusCode = [HttpStatusCode ]::InternalServerError
83- Body = @ { Results = " Failed to snooze alert: $ ( $ErrorMessage.NormalizedError ) " }
84- })
82+ StatusCode = [HttpStatusCode ]::InternalServerError
83+ Body = @ { Results = " Failed to snooze alert: $ ( $ErrorMessage.NormalizedError ) " }
84+ })
8585 }
8686}
0 commit comments