File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 11using namespace System.Net
22
3- Function Invoke-ExecAddTrustedIP {
3+ function Invoke-ExecAddTrustedIP {
44 <#
55 . FUNCTIONALITY
66 Entrypoint
@@ -11,12 +11,13 @@ Function Invoke-ExecAddTrustedIP {
1111 param ($Request , $TriggerMetadata )
1212
1313 $Table = Get-CippTable - tablename ' trustedIps'
14- Add-CIPPAzDataTableEntity @Table - Entity @ {
15- PartitionKey = $Request.Body.tenantfilter
16- RowKey = $Request.Body.IP
17- state = $Request.Body.State
18- } - Force
19-
14+ foreach ($IP in $Request.body.IP ) {
15+ Add-CIPPAzDataTableEntity @Table - Entity @ {
16+ PartitionKey = $Request.Body.tenantfilter
17+ RowKey = $IP
18+ state = $Request.Body.State
19+ } - Force
20+ }
2021 Push-OutputBinding - Name Response - Value ([HttpResponseContext ]@ {
2122 StatusCode = [HttpStatusCode ]::OK
2223 Body = @ { results = " Added $ ( $Request.Body.IP ) to database with state $ ( $Request.Body.State ) for $ ( $Request.Body.tenantfilter ) " }
You can’t perform that action at this time.
0 commit comments