mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-13 01:42:29 +00:00
Fix broken get parameters
This commit is contained in:
parent
923838e15f
commit
88a94115b1
2 changed files with 3 additions and 3 deletions
|
|
@ -71,7 +71,7 @@ function Invoke-SnipeitMethod {
|
|||
# This can be done using $Body, maybe some day - PetriAsi
|
||||
if ($GetParameters -and ($apiUri -notlike "*\?*")){
|
||||
Write-Debug "Using `$GetParameters: $($GetParameters | Out-String)"
|
||||
[string]$URI += (ConvertTo-GetParameter $GetParameters)
|
||||
[string]$apiUri = $apiUri + (ConvertTo-GetParameter $GetParameters)
|
||||
# Prevent recursive appends
|
||||
$GetParameters = $null
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,12 +68,12 @@ function Connect-SnipeitPS {
|
|||
PROCESS {
|
||||
switch ($PsCmdlet.ParameterSetName) {
|
||||
'Connect with url and apikey' {
|
||||
$SnipeitPSSession.url = $url.TrimEnd('/')
|
||||
$SnipeitPSSession.url = $url.AbsoluteUri.TrimEnd('/')
|
||||
$SnipeitPSSession.apiKey = ConvertTo-SecureString -AsPlainText -String $apiKey
|
||||
}
|
||||
|
||||
'Connect with url and secure apikey' {
|
||||
$SnipeitPSSession.url = $url.TrimEnd('/')
|
||||
$SnipeitPSSession.url = $url.AbsoluteUri.TrimEnd('/')
|
||||
$SnipeitPSSession.apiKey = $secureApiKey
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue