Skip to content

Commit

Permalink
Fix Update-VSTeamUserEntitlement to correctly use contentype applicat…
Browse files Browse the repository at this point in the history
…ion/json-patch+json (#430)

* Updated contentType
* Update CHANGELOG.md

Co-authored-by: Sebastian Schütze <[email protected]>
  • Loading branch information
thahif and SebastianSchuetze authored Jan 10, 2022
1 parent 2eafd54 commit b649e51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/414) from [Guillermo Diaz](https://github.com/gm0d) which included the following:

- Added Get-VSTeamWiki, Add-VSTeamWiki, Remove-VSTeamWiki, for interacting with Wikis

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/430) from [thahif Diaz](https://github.com/thahif) which included the following:

- Updated Update-VSTeamUserEntitlement to correctly use contentype application/json-patch+json

## 7.4.0

Expand Down
6 changes: 3 additions & 3 deletions Source/Public/Update-VSTeamUserEntitlement.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function Update-VSTeamUserEntitlement {
function Update-VSTeamUserEntitlement {
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "High", DefaultParameterSetName = 'ByEmail',
HelpUri = 'https://methodsandpractices.github.io/vsteam-docs/docs/modules/vsteam/commands/Update-VSTeamUserEntitlement')]
param (
Expand Down Expand Up @@ -74,7 +74,7 @@ function Update-VSTeamUserEntitlement {
_callAPI -Method PATCH -SubDomain vsaex -NoProject `
-Resource userentitlements `
-Id $id `
-ContentType 'application/json-patch+; charset=utf-8' `
-ContentType 'application/json-patch+json; charset=utf-8' `
-Body $body `
-Version $(_getApiVersion MemberEntitlementManagement) | Out-Null

Expand All @@ -83,4 +83,4 @@ function Update-VSTeamUserEntitlement {
Write-Information "Updated user license for $( $user.userName ) ($( $user.email )) from MSDNLicenseType: ($msdnLicenseTypeOriginal) to ($newMSDNLicenseType)"
}
}
}
}

0 comments on commit b649e51

Please sign in to comment.