Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbarron committed Jul 14, 2022
1 parent 1e0c9a0 commit 3898d39
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions ServiceNow/Private/Invoke-ServiceNowRestMethod.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ function Invoke-ServiceNowRestMethod {
if ($PSCmdlet.PagingParameters.First -ne [uint64]::MaxValue) {
$Body['sysparm_limit'] = $PSCmdlet.PagingParameters.First
}
# else {
# $Body['sysparm_limit'] = 10
# }

if ($PSCmdlet.PagingParameters.Skip) {
$Body['sysparm_offset'] = $PSCmdlet.PagingParameters.Skip
Expand All @@ -126,12 +123,6 @@ function Invoke-ServiceNowRestMethod {
}
}

# Populate the query
# else {
# $body['sysparm_query'] = (New-ServiceNowQuery -Filter $Filter -Sort $Sort)
# }


if ( $Values ) {
$Body = $Values | ConvertTo-Json

Expand Down Expand Up @@ -197,7 +188,7 @@ function Invoke-ServiceNowRestMethod {
}

# if option to get all records was provided, loop and get them all
if ( $PSCmdlet.PagingParameters.IncludeTotalCount.IsPresent ) {
if ( $PSCmdlet.PagingParameters.IncludeTotalCount ) {

$retrieveRecordCount = $totalRecordCount - $PSCmdlet.PagingParameters.Skip
if ( $retrieveRecordCount -ne 0 ) {
Expand Down

0 comments on commit 3898d39

Please sign in to comment.