Skip to content

Commit

Permalink
switch geo ip lookup to post
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnDuprey committed Feb 7, 2025
1 parent 56fde8a commit e93b097
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Function Invoke-ExecAddTrustedIP {

$Table = Get-CippTable -tablename 'trustedIps'
Add-CIPPAzDataTableEntity @Table -Entity @{
PartitionKey = $request.query.tenantfilter
RowKey = $Request.query.ip
state = $request.query.State
PartitionKey = $Request.Body.tenantfilter
RowKey = $Request.Body.IP
state = $Request.Body.State
} -Force

Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
StatusCode = [HttpStatusCode]::OK
Body = @{ results = "Added $($Request.query.ip) to database with state $($Request.query.state) for $($Request.query.tenantfilter)" }
Body = @{ results = "Added $($Request.Body.IP) to database with state $($Request.Body.State) for $($Request.Body.tenantfilter)" }
})
}
}

0 comments on commit e93b097

Please sign in to comment.