Skip to content

Commit

Permalink
v1.6.1 - Bugfix for Jobs endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
homotechsual committed Oct 28, 2022
1 parent c0c90b7 commit 5832f46
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions NinjaOne.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = '.\NinjaOne.psm1'

# Version number of this module.
ModuleVersion = '1.6.0'
ModuleVersion = '1.6.1'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -245,7 +245,7 @@
IconUri = 'https://pbs.twimg.com/profile_images/1452496768030187521/kIGQii5Y_400x400.jpg'

# ReleaseNotes of this module
ReleaseNotes = 'Fix multiple parameters which were incorrect set as mandatoryowerShell implementation. Faster, easier and more maintainable.'
ReleaseNotes = 'Fix return value for Jobs endpoint.'

# Prerelease string of this module
# Prerelease = ''
Expand Down
2 changes: 1 addition & 1 deletion Private/New-NinjaOneGETRequest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function New-NinjaOneGETRequest {
Write-Debug "Returning 'result' property."
Write-Debug "Result type is $($Result.result.GetType())"
Return $Result.result
} elseif ($Properties.name -contains 'data') {
} elseif (($Properties.name -contains 'data') -and (-not $NoDrill)) {
Write-Debug "Returning 'data' property."
Write-Debug "Result type is $($Result.data.GetType())"
Return $Result.data
Expand Down
1 change: 1 addition & 0 deletions Public/Get/Entities/Get-NinjaOneJobs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function Get-NinjaOneJobs {
$RequestParams = @{
Resource = $Resource
QSCollection = $QSCollection
NoDrill = $True
}
$JobResults = New-NinjaOneGETRequest @RequestParams
Return $JobResults
Expand Down
4 changes: 4 additions & 0 deletions Public/Get/Ticketing/Get-NinjaOneTicketLogEntries.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ function Get-NinjaOneTicketLogEntries {
)
$CommandName = $MyInvocation.InvocationName
$Parameters = (Get-Command -Name $CommandName).Parameters
# Workaround to prevent the query string processor from adding an 'ticketid=' parameter by removing it from the set parameters.
if ($boardID) {
$Parameters.Remove('ticketID') | Out-Null
}
try {
$QSCollection = New-NinjaOneQuery -CommandName $CommandName -Parameters $Parameters
$Resource = "v2/ticketing/ticket/$ticketID/log-entry"
Expand Down

0 comments on commit 5832f46

Please sign in to comment.