Skip to content

Commit

Permalink
fix posts
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Jan 9, 2025
1 parent 21fb495 commit c8e2086
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ Function Invoke-ExecDeviceAction {
$APIName = $TriggerMetadata.FunctionName
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -message 'Accessed this API' -Sev 'Debug'

# Interact with query parameters or the body of the request.
# Interact with Body parameters or the body of the request.


try {
if ($Request.Query.Action -eq 'setDeviceName') {
if ($Request.Body.Action -eq 'setDeviceName') {
$ActionBody = @{ deviceName = $Request.Body.input } | ConvertTo-Json -Compress
}
$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
$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
$body = [pscustomobject]@{'Results' = "$ActionResult" }

} catch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Function Invoke-ExecGetLocalAdminPassword {
$APIName = $TriggerMetadata.FunctionName

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

} catch {
Expand Down
2 changes: 1 addition & 1 deletion Modules/CIPPCore/Public/Standards/Get-CIPPStandards.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function Get-CIPPStandards {
$Standards = $Template.standards
foreach ($StandardName in $Standards.PSObject.Properties.Name) {
$CurrentStandard = $Standards.$StandardName.PSObject.Copy()
$Actions = $CurrentStandard.action.value
$Actions = $CurrentStandard.action.value | Where-Object { $_ -in 'Remediate', 'warn', 'report' }
if ($Actions -contains 'Remediate' -or $Actions -contains 'warn' -or $Actions -contains 'Report') {
if (-not $ComputedStandards.Contains($StandardName)) {
$ComputedStandards[$StandardName] = $CurrentStandard
Expand Down

0 comments on commit c8e2086

Please sign in to comment.