mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-13 18:02:30 +00:00
Convert body only when it exist
This commit is contained in:
parent
2850b82a16
commit
d9be192b3e
2 changed files with 6 additions and 4 deletions
|
|
@ -35,7 +35,7 @@
|
|||
}
|
||||
|
||||
#To support images "image" property have be handled before this
|
||||
$Body = $Body | ConvertTo-Json
|
||||
if($Body) { $body = $Body | ConvertTo-Json }
|
||||
|
||||
$_headers = @{
|
||||
"Authorization" = "Bearer $($token)"
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
|
||||
$script:PSDefaultParameterValues = $global:PSDefaultParameterValues
|
||||
|
||||
Write-Debug $Body
|
||||
Write-Debug "$($Body | ConvertTo-Json)"
|
||||
|
||||
# Invoke the API
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -46,9 +46,11 @@ function Set-SnipeitLicenseSeat()
|
|||
[int]$seat_id,
|
||||
|
||||
[Alias('assigned_id')]
|
||||
[int]$assigned_to,
|
||||
|
||||
[int]$asset_id,
|
||||
[Nullable[System.Int32]]$assigned_to,
|
||||
|
||||
|
||||
[Nullable[System.Int32]]$asset_id,
|
||||
|
||||
[string]$note,
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue