-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
Context
Trying to pull deleted users to restore any staff that have returned so asset history is maintained.
Your Environment
- SnipitPS Module version used: 1.10.227
- Operating System and PowerShell version: 5.1.19041.2364
- Snipe It version: v6.0.14
Expected Behavior
Calling Get-SnipeitUser -all -deleted $true returns deleted users.
It looks like $true is being passed as a parameter to the API but it should be 'true' as a string. The parameter validates for boolean $true/$false or 0/1 so I can't pass -deleted 'true'
Current Behavior
Returns same as Get-SnipeitUser -all, seems like -deleted is ignored.
Possible Solution
Could probably just switch the variables to strings before the request is made.
$deleted = switch ($deleted) {
$true {'true'}
$false {'false'}
}
Steps to Reproduce (for bugs)
Get-SnipeitUser -all -deleted $true
Metadata
Metadata
Assignees
Labels
No labels