Extra checks

This commit is contained in:
Stephen Maunder 2017-11-20 09:12:54 +00:00
parent 4515fe0834
commit 2c1454b673
7 changed files with 16 additions and 9 deletions

View file

@ -68,7 +68,10 @@ function New-Asset()
"model_id" = $model_id
}
$Values += $customfields
if ($customfields)
{
$Values += $customfields
}
$Body = $Values | ConvertTo-Json;
@ -79,7 +82,7 @@ function New-Asset()
Token = $apiKey
}
If ($PSCmdlet.ShouldProcess())
If ($PSCmdlet.ShouldProcess("ShouldProcess?"))
{
$result = Invoke-Method @Parameters
}

View file

@ -66,7 +66,7 @@ function New-Component()
Token = $apiKey
}
If ($PSCmdlet.ShouldProcess())
If ($PSCmdlet.ShouldProcess("ShouldProcess?"))
{
$result = Invoke-Method @Parameters
}

View file

@ -51,7 +51,7 @@ function New-Manufacturer()
Token = $apiKey
}
If ($PSCmdlet.ShouldProcess())
If ($PSCmdlet.ShouldProcess("ShouldProcess?"))
{
$result = Invoke-Method @Parameters
}

View file

@ -70,7 +70,7 @@ function New-Model()
Token = $apiKey
}
If ($PSCmdlet.ShouldProcess())
If ($PSCmdlet.ShouldProcess("ShouldProcess?"))
{
$result = Invoke-Method @Parameters
}

View file

@ -68,7 +68,11 @@ function Set-Asset()
"model_id" = $model_id
}
$Values += $customfields
if ($customfields)
{
$Values += $customfields
}
$Body = $Values | ConvertTo-Json;
$Parameters = @{
@ -78,7 +82,7 @@ function Set-Asset()
Token = $apiKey
}
If ($PSCmdlet.ShouldProcess())
If ($PSCmdlet.ShouldProcess("ShouldProcess?"))
{
$result = Invoke-Method @Parameters
}

View file

@ -32,7 +32,7 @@ function Set-AssetOwner()
Token = $apiKey
}
If ($PSCmdlet.ShouldProcess())
If ($PSCmdlet.ShouldProcess("ShouldProcess?"))
{
$result = Invoke-Method @Parameters
}

View file

@ -32,7 +32,7 @@ function Set-Component()
Token = $apiKey
}
If ($PSCmdlet.ShouldProcess())
If ($PSCmdlet.ShouldProcess("ShouldProcess?"))
{
$result = Invoke-Method @Parameters
}