Skip to content

Commit 9ca9401

Browse files
committed
bit of basic cleanup and readability
1 parent 16a943b commit 9ca9401

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

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

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ function Invoke-ListAssignmentFilterTemplates {
88
[CmdletBinding()]
99
param($Request, $TriggerMetadata)
1010

11-
$APIName = $Request.Params.CIPPEndpoint
12-
$Headers = $Request.Headers
13-
14-
15-
16-
Write-Host $Request.query.id
11+
$ID = $Request.Query.ID
1712

1813
#List assignment filter templates
1914
$Table = Get-CippTable -tablename 'templates'
@@ -22,16 +17,16 @@ function Invoke-ListAssignmentFilterTemplates {
2217
$data = $_.JSON | ConvertFrom-Json
2318

2419
[PSCustomObject]@{
25-
displayName = $data.displayName
26-
description = $data.description
27-
platform = $data.platform
28-
rule = $data.rule
29-
assignmentFilterManagementType = $data.assignmentFilterManagementType
30-
GUID = $_.RowKey
20+
displayName = $data.displayName
21+
description = $data.description
22+
platform = $data.platform
23+
rule = $data.rule
24+
assignmentFilterManagementType = $data.assignmentFilterManagementType
25+
GUID = $_.RowKey
3126
}
3227
} | Sort-Object -Property displayName
3328

34-
if ($Request.query.ID) { $Templates = $Templates | Where-Object -Property GUID -EQ $Request.query.id }
29+
if ($ID) { $Templates = $Templates | Where-Object -Property GUID -EQ $ID }
3530

3631

3732
# Associate values to output bindings by calling 'Push-OutputBinding'.

0 commit comments

Comments
 (0)