Skip to content

Commit 3813692

Browse files
committed
Fix assignment logic in Invoke-AddStoreApp
Corrects the assignment of the $assignTo variable to use the value of CustomGroup when AssignTo is 'customGroup'. Also updates function definition to use lowercase 'function' for consistency.
1 parent e30606a commit 3813692

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Endpoint/Applications/Invoke-AddStoreApp.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Function Invoke-AddStoreApp {
1+
function Invoke-AddStoreApp {
22
<#
33
.FUNCTIONALITY
44
Entrypoint
@@ -13,7 +13,7 @@ Function Invoke-AddStoreApp {
1313

1414

1515
$WinGetApp = $Request.Body
16-
$assignTo = $Request.body.AssignTo
16+
$assignTo = $Request.Body.AssignTo -eq 'customGroup' ? $Request.Body.CustomGroup : $Request.Body.AssignTo
1717

1818
if ($ChocoApp.InstallAsSystem) { 'system' } else { 'user' }
1919
$WinGetData = [ordered]@{

0 commit comments

Comments
 (0)