InvokeNetboxRequest(Helpers): Fix indent (using Visual Code Formatter)

This commit is contained in:
Alexis La Goutte 2021-07-21 22:22:59 +02:00
parent 4ad0562466
commit 2bf4ed6f6f

View file

@ -38,13 +38,13 @@ function InvokeNetboxRequest {
$Headers.Authorization = "Token {0}" -f $creds.GetNetworkCredential().Password
$splat = @{
'Method' = $Method
'Uri' = $URI.Uri.AbsoluteUri # This property auto generates the scheme, hostname, path, and query
'Headers' = $Headers
'TimeoutSec' = $Timeout
'Method' = $Method
'Uri' = $URI.Uri.AbsoluteUri # This property auto generates the scheme, hostname, path, and query
'Headers' = $Headers
'TimeoutSec' = $Timeout
'ContentType' = 'application/json'
'ErrorAction' = 'Stop'
'Verbose' = $VerbosePreference
'Verbose' = $VerbosePreference
}
if ($Body) {
@ -93,11 +93,13 @@ function InvokeNetboxRequest {
if ($Raw) {
Write-Verbose "Returning raw result by choice"
return $result
} else {
}
else {
if ($result.psobject.Properties.Name.Contains('results')) {
Write-Verbose "Found Results property on data, returning results directly"
return $result.Results
} else {
}
else {
Write-Verbose "Did NOT find results property on data, returning raw result"
return $result
}