Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

ecspresso
Copy link
Contributor

-body $body was missing, filtering was not working as a result.

Emile added 4 commits October 19, 2018 08:33
`-body $body` was missing, filtering was not working as a result.
New-ITGluePasswords looked for $flexible_asset_type_id instaead of $organization_id when deciding on nested route or not.
The parameter block of Set-ITGluePasswords and Remove-ITGluePasswords used "[CmdletBinding(DefaultParameterSetName='')] instead of [Parameter(ParameterSetName = '')].
Changed method to DELETE and remove the body if the parameterset eq Destroy.
Made data parameter only mandatory if parameterset is Update or Bulk_destory.
Added method to a variable, default to `DELETE` and change to `PATCH` if parameter set is `bulk_destroy`. Moved `$body` etc to within `bulk_destroy` in order to keep as `null` and not fail during `Invoke-RestMethod`.
@ecspresso
Copy link
Contributor Author

Is [Parameter(ParameterSetName = 'update', Mandatory = $true)] needed? Should it not be removed since we are removing the object and not changing it.

@adrianwells
Copy link
Collaborator

@ecspresso Thank you for the PR. Hope to merge it soon. Do not yet have an answer to your question regarding if [Parameter(ParameterSetName = 'update', Mandatory = $true)] is needed, if you have more thoughts, please share.

Remove-ITGluePasswords:
Only DELETE method is used when removing password, corrected that. I also removed $data parameter from the parameter set "destroy" because only ID is a valid parameter when deleting a single password.
@ecspresso
Copy link
Contributor Author

@adrianwells I updated the function Remove-ITGluePasswords to reflect what I had in mind. When removing a single password, only ID can be supplied. It seems IT Glue ignores the empty body also supplied, so this does not have to be handled for now.

@adrianwells
Copy link
Collaborator

@ecspresso, Great! Do you mind incrementing the Module version in ITGlueAPI/ITGlueAPI.psd1 as part of this PR to help with versioning? Trying to use versioning and releases to help tracking the efforts.

@ecspresso
Copy link
Contributor Author

@adrianwells I changed to version 2.0.4, is this correct?

@adrianwells
Copy link
Collaborator

@ecspresso, yes that looks good! Thank you.

@adrianwells adrianwells merged commit 928606d into itglue:master Jan 16, 2019
@ecspresso ecspresso deleted the patch-2 branch January 17, 2019 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants