Skip to content

Commit d4e6b20

Browse files
output binding fixes
1 parent f124bbf commit d4e6b20

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecExchangeRoleRepair.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function Invoke-ExecExchangeRoleRepair {
8989
}
9090
}
9191

92-
Push-OutputBinding -Name 'Response' -Value ([HttpResponseContext]@{
92+
returns ([HttpResponseContext]@{
9393
StatusCode = [System.Net.HttpStatusCode]::OK
9494
Body = $Results
9595
})

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Endpoint/MEM/Invoke-ExecDevicePasscodeAction.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function Invoke-ExecDevicePasscodeAction {
4646
$Results = $Result
4747
}
4848

49-
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
49+
return ([HttpResponseContext]@{
5050
StatusCode = $StatusCode
5151
Body = @{Results = $Results }
5252
})

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Invoke-AddTestReport.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function Invoke-AddTestReport {
5353
$StatusCode = [HttpStatusCode]::BadRequest
5454
}
5555

56-
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
56+
return ([HttpResponseContext]@{
5757
StatusCode = $StatusCode
5858
Body = ConvertTo-Json -InputObject $Body -Depth 10
5959
})

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Invoke-DeleteTestReport.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function Invoke-DeleteTestReport {
3030
$StatusCode = [HttpStatusCode]::BadRequest
3131
}
3232

33-
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
33+
return ([HttpResponseContext]@{
3434
StatusCode = $StatusCode
3535
Body = ConvertTo-Json -InputObject $Body -Depth 10
3636
})

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Invoke-ListAvailableTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function Invoke-ListAvailableTests {
7979
$StatusCode = [HttpStatusCode]::BadRequest
8080
}
8181

82-
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
82+
return ([HttpResponseContext]@{
8383
StatusCode = $StatusCode
8484
Body = ConvertTo-Json -InputObject $Body -Depth 10
8585
})

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Invoke-ListTestReports.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function Invoke-ListTestReports {
6262
$Body = @{ Error = $ErrorMessage.NormalizedError }
6363
}
6464

65-
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
65+
return([HttpResponseContext]@{
6666
StatusCode = $StatusCode
6767
Body = ConvertTo-Json -InputObject $Body -Depth 10 -Compress
6868
})

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Invoke-ListTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function Invoke-ListTests {
156156
$Body = @{ Error = $ErrorMessage.NormalizedError }
157157
}
158158

159-
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
159+
return ([HttpResponseContext]@{
160160
StatusCode = $StatusCode
161161
Body = $Body
162162
})

0 commit comments

Comments
 (0)