Skip to content

Commit

Permalink
Fix a couple of other commandlets which didn't get the correct plural…
Browse files Browse the repository at this point in the history
…isation in their Get- commands.
  • Loading branch information
homotechsual committed Apr 3, 2023
1 parent dc33e5d commit f77cb32
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Public/New/New-NinjaOneLocation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function New-NinjaOneLocation {
Resource = $Resource
Body = $location
}
$OrganisationExists = (Get-NinjaOneOrganisation -Id $organisationId).Count -gt 0
$OrganisationExists = (Get-NinjaOneOrganisations -Id $organisationId).Count -gt 0
if ($OrganisationExists) {
if ($PSCmdlet.ShouldProcess("Location '$($location.name)'", 'Create')) {
$LocationCreate = New-NinjaOnePOSTRequest @RequestParams
Expand Down
4 changes: 2 additions & 2 deletions Public/Update/Update-NinjaOneLocation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ function Update-NinjaOneLocation {
Resource = $Resource
Body = $deviceInformation
}
$OrganisationExists = (Get-NinjaOneOrganisation -OrganisationId $organisationId).Count -gt 0
$LocationExists = (Get-NinjaOneLocation -OrganisationId $organisationId -LocationId $locationId).Count -gt 0
$OrganisationExists = (Get-NinjaOneOrganisations -OrganisationId $organisationId).Count -gt 0
$LocationExists = (Get-NinjaOneLocations -OrganisationId $organisationId -LocationId $locationId).Count -gt 0
if ($OrganisationExists -and $LocationExists) {
if ($PSCmdlet.ShouldProcess('Location information', 'Update')) {
$LocationUpdate = New-NinjaOnePATCHRequest @RequestParams
Expand Down
2 changes: 1 addition & 1 deletion Public/Update/Update-NinjaOneTicket.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function Update-NinjaOneTicket {
Resource = $Resource
Body = $ticket
}
$TicketExists = (Get-NinjaOneTicket -TicketId $ticketId).Count -gt 0
$TicketExists = (Get-NinjaOneTickets -TicketId $ticketId).Count -gt 0
if ($TicketExists) {
if ($PSCmdlet.ShouldProcess('Ticket', 'Update')) {
$TicketUpdate = New-NinjaOnePUTRequest @RequestParams
Expand Down

0 comments on commit f77cb32

Please sign in to comment.