Skip to content

Commit c8e2086

Browse files
fix posts
1 parent 21fb495 commit c8e2086

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Function Invoke-ExecDeviceAction {
1313
$APIName = $TriggerMetadata.FunctionName
1414
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -message 'Accessed this API' -Sev 'Debug'
1515

16-
# Interact with query parameters or the body of the request.
16+
# Interact with Body parameters or the body of the request.
1717

1818

1919
try {
20-
if ($Request.Query.Action -eq 'setDeviceName') {
20+
if ($Request.Body.Action -eq 'setDeviceName') {
2121
$ActionBody = @{ deviceName = $Request.Body.input } | ConvertTo-Json -Compress
2222
}
23-
$ActionResult = New-CIPPDeviceAction -Action $Request.Query.Action -ActionBody $ActionBody -DeviceFilter $Request.Query.GUID -TenantFilter $Request.Query.TenantFilter -ExecutingUser $request.headers.'x-ms-client-principal' -APINAME $APINAME
23+
$ActionResult = New-CIPPDeviceAction -Action $Request.Body.Action -ActionBody $ActionBody -DeviceFilter $Request.Body.GUID -TenantFilter $Request.Body.TenantFilter -ExecutingUser $request.headers.'x-ms-client-principal' -APINAME $APINAME
2424
$body = [pscustomobject]@{'Results' = "$ActionResult" }
2525

2626
} catch {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Function Invoke-ExecGetLocalAdminPassword {
1313
$APIName = $TriggerMetadata.FunctionName
1414

1515
try {
16-
$GraphRequest = Get-CIPPLapsPassword -device $($request.query.guid) -tenantFilter $Request.Query.TenantFilter -APIName $APINAME -ExecutingUser $request.headers.'x-ms-client-principal'
16+
$GraphRequest = Get-CIPPLapsPassword -device $($request.body.guid) -tenantFilter $Request.body.TenantFilter -APIName $APINAME -ExecutingUser $request.headers.'x-ms-client-principal'
1717
$Body = [pscustomobject]@{'Results' = $GraphRequest }
1818

1919
} catch {

Modules/CIPPCore/Public/Standards/Get-CIPPStandards.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function Get-CIPPStandards {
116116
$Standards = $Template.standards
117117
foreach ($StandardName in $Standards.PSObject.Properties.Name) {
118118
$CurrentStandard = $Standards.$StandardName.PSObject.Copy()
119-
$Actions = $CurrentStandard.action.value
119+
$Actions = $CurrentStandard.action.value | Where-Object { $_ -in 'Remediate', 'warn', 'report' }
120120
if ($Actions -contains 'Remediate' -or $Actions -contains 'warn' -or $Actions -contains 'Report') {
121121
if (-not $ComputedStandards.Contains($StandardName)) {
122122
$ComputedStandards[$StandardName] = $CurrentStandard

0 commit comments

Comments
 (0)