Skip to content

Commit

Permalink
Merge branch 'pr/MichelZ/239'
Browse files Browse the repository at this point in the history
  • Loading branch information
DarqueWarrior committed Feb 25, 2020
2 parents 663c618 + e39777f commit 5ad6cf7
Show file tree
Hide file tree
Showing 47 changed files with 95 additions and 89 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 6.4.5

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/239) from [Michel Zehnder](https://github.com/MichelZ) which included the following:

Added ;charset=utf-8 to POST/PUT JSON requests

## 6.4.4

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/257) from [Michel Zehnder](https://github.com/MichelZ) which included the following:
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Add-VSTeam.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function Add-VSTeam {

# Call the REST API
$resp = _callAPI -Area 'projects' -Resource "$ProjectName/teams" `
-Method Post -ContentType 'application/json' -Body $body -Version $([VSTeamVersions]::Core)
-Method Post -ContentType 'application/json;charset=utf-8' -Body $body -Version $([VSTeamVersions]::Core)

$team = [VSTeamTeam]::new($resp, $ProjectName)

Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Add-VSTeamAccessControlEntry.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ $body =
# Call the REST API
$resp = _callAPI -Area 'accesscontrolentries' -id $SecurityNamespaceId -method POST -body $body `
-Version $([VSTeamVersions]::Core) `
-ContentType "application/json"
-ContentType "application/json;charset=utf-8"

if ($resp.count -ne 1)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Add-VSTeamBuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function Add-VSTeamBuild {

# Call the REST API
$resp = _callAPI -ProjectName $ProjectName -Area 'build' -Resource 'builds' `
-Method Post -ContentType 'application/json' -Body ($body | ConvertTo-Json) `
-Method Post -ContentType 'application/json;charset=utf-8' -Body ($body | ConvertTo-Json) `
-Version $([VSTeamVersions]::Build)

_applyTypesToBuild -item $resp
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Add-VSTeamBuildDefinition.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function Add-VSTeamBuildDefinition {
# Bind the parameter to a friendly variable
$ProjectName = $PSBoundParameters["ProjectName"]

$resp = _callAPI -Method Post -ProjectName $ProjectName -Area build -Resource definitions -Version $([VSTeamVersions]::Build) -infile $InFile -ContentType 'application/json'
$resp = _callAPI -Method Post -ProjectName $ProjectName -Area build -Resource definitions -Version $([VSTeamVersions]::Build) -infile $InFile -ContentType 'application/json;charset=utf-8'

return $resp
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Add-VSTeamExtension.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function Add-VSTeamExtension {
$resource += '/' + $Version
}

$resp = _callAPI -Method Post -SubDomain 'extmgmt' -Resource $resource -Version $([VSTeamVersions]::ExtensionsManagement) -ContentType "application/json"
$resp = _callAPI -Method Post -SubDomain 'extmgmt' -Resource $resource -Version $([VSTeamVersions]::ExtensionsManagement) -ContentType "application/json;charset=utf-8"

$item = [VSTeamExtension]::new($resp)

Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Add-VSTeamFeed.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function Add-VSTeamFeed {

# Call the REST API
$resp = _callAPI -subDomain feeds -Area packaging -Resource feeds `
-Method Post -ContentType 'application/json' -body $bodyAsJson -Version $([VSTeamVersions]::Packaging)
-Method Post -ContentType 'application/json;charset=utf-8' -body $bodyAsJson -Version $([VSTeamVersions]::Packaging)

return [VSTeamFeed]::new($resp)
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Add-VSTeamGitRepository.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function Add-VSTeamGitRepository {
try {
# Call the REST API
$resp = _callAPI -ProjectName $ProjectName -Area 'git' -Resource 'repositories' `
-Method Post -ContentType 'application/json' -Body $body -Version $([VSTeamVersions]::Git)
-Method Post -ContentType 'application/json;charset=utf-8' -Body $body -Version $([VSTeamVersions]::Git)

# Storing the object before you return it cleaned up the pipeline.
# When I just write the object from the constructor each property
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Add-VSTeamPolicy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Add-VSTeamPolicy {
try {
# Call the REST API
$resp = _callAPI -ProjectName $ProjectName -Area 'policy' -Resource 'configurations' `
-Method Post -ContentType 'application/json' -Body $body -Version $([VSTeamVersions]::Git)
-Method Post -ContentType 'application/json;charset=utf-8' -Body $body -Version $([VSTeamVersions]::Git)

Write-Output $resp
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Add-VSTeamProject.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function Add-VSTeamProject {
try {
# Call the REST API
$resp = _callAPI -Area 'projects' `
-Method Post -ContentType 'application/json' -body $body -Version $([VSTeamVersions]::Core)
-Method Post -ContentType 'application/json;charset=utf-8' -body $body -Version $([VSTeamVersions]::Core)

_trackProjectProgress -resp $resp -title 'Creating team project' -msg "Name: $($ProjectName), Template: $($processTemplate), Src: $($srcCtrl)"

Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Add-VSTeamRelease.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function Add-VSTeamRelease {
try {
Write-Debug 'Add-VSTeamRelease Call the REST API'
$resp = _callAPI -SubDomain 'vsrm' -ProjectName $ProjectName -Area 'release' -Resource 'releases' `
-Method Post -ContentType 'application/json' -Body $body -Version $([VSTeamVersions]::Release)
-Method Post -ContentType 'application/json;charset=utf-8' -Body $body -Version $([VSTeamVersions]::Release)

_applyTypesToRelease $resp

Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Add-VSTeamReleaseDefinition.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function Add-VSTeamReleaseDefinition {
$ProjectName = $PSBoundParameters["ProjectName"]

$resp = _callAPI -Method Post -subDomain vsrm -Area release -Resource definitions -ProjectName $ProjectName `
-Version $([VSTeamVersions]::Release) -inFile $inFile -ContentType 'application/json'
-Version $([VSTeamVersions]::Release) -inFile $inFile -ContentType 'application/json;charset=utf-8'

Write-Output $resp
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Add-VSTeamServiceEndpoint.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function Add-VSTeamServiceEndpoint {

# Call the REST API
$resp = _callAPI -ProjectName $projectName -Area 'distributedtask' -Resource 'serviceendpoints' `
-Method Post -ContentType 'application/json' -body $body -Version $([VSTeamVersions]::DistributedTask)
-Method Post -ContentType 'application/json;charset=utf-8' -body $body -Version $([VSTeamVersions]::DistributedTask)

_trackServiceEndpointProgress -projectName $projectName -resp $resp -title 'Creating Service Endpoint' -msg "Creating $endpointName"

Expand Down
4 changes: 2 additions & 2 deletions Source/Public/Add-VSTeamTaskGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ function Add-VSTeamTaskGroup {
$ProjectName = $PSBoundParameters["ProjectName"]

if ($InFile) {
$resp = _callAPI -Method Post -ProjectName $ProjectName -Area distributedtask -Resource taskgroups -Version $([VSTeamVersions]::TaskGroups) -InFile $InFile -ContentType 'application/json'
$resp = _callAPI -Method Post -ProjectName $ProjectName -Area distributedtask -Resource taskgroups -Version $([VSTeamVersions]::TaskGroups) -InFile $InFile -ContentType 'application/json;charset=utf-8'
}
else {
$resp = _callAPI -Method Post -ProjectName $ProjectName -Area distributedtask -Resource taskgroups -Version $([VSTeamVersions]::TaskGroups) -ContentType 'application/json' -Body $Body
$resp = _callAPI -Method Post -ProjectName $ProjectName -Area distributedtask -Resource taskgroups -Version $([VSTeamVersions]::TaskGroups) -ContentType 'application/json;charset=utf-8' -Body $Body
}

return $resp
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Add-VSTeamUserEntitlement.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ function Add-VSTeamUserEntitlement {
$body = $obj | ConvertTo-Json

# Call the REST API
_callAPI -Method Post -Body $body -SubDomain 'vsaex' -Resource 'userentitlements' -Version $([VSTeamVersions]::MemberEntitlementManagement) -ContentType "application/json"
_callAPI -Method Post -Body $body -SubDomain 'vsaex' -Resource 'userentitlements' -Version $([VSTeamVersions]::MemberEntitlementManagement) -ContentType "application/json;charset=utf-8"
}
}
2 changes: 1 addition & 1 deletion Source/Public/Add-VSTeamVariableGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function Add-VSTeamVariableGroup {

# Call the REST API
$resp = _callAPI -ProjectName $projectName -Area 'distributedtask' -Resource 'variablegroups' `
-Method Post -ContentType 'application/json' -body $body -Version $([VSTeamVersions]::VariableGroups)
-Method Post -ContentType 'application/json;charset=utf-8' -body $body -Version $([VSTeamVersions]::VariableGroups)

return Get-VSTeamVariableGroup -ProjectName $ProjectName -id $resp.id
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Add-VSTeamWorkItem.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function Add-VSTeamWorkItem {
# Call the REST API
$resp = _callAPI -ProjectName $ProjectName -Area 'wit' -Resource 'workitems' `
-Version $([VSTeamVersions]::Core) -id $WorkItemType -Method Post `
-ContentType 'application/json-patch+json' -Body $json
-ContentType 'application/json-patch+json;charset=utf-8' -Body $json

_applyTypesToWorkItem -item $resp

Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Disable-VSTeamAgent.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function Disable-VSTeamAgent {
process {
foreach ($item in $Id) {
try {
_callAPI -Method Patch -Area "distributedtask/pools/$PoolId" -Resource agents -Id $item -Version $([VSTeamVersions]::DistributedTask) -ContentType "application/json" -Body "{'enabled':false,'id':$item,'maxParallelism':1}" | Out-Null
_callAPI -Method Patch -Area "distributedtask/pools/$PoolId" -Resource agents -Id $item -Version $([VSTeamVersions]::DistributedTask) -ContentType "application/json;charset=utf-8" -Body "{'enabled':false,'id':$item,'maxParallelism':1}" | Out-Null
Write-Output "Disabled agent $item"
}
catch {
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Enable-VSTeamAgent.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function Enable-VSTeamAgent {
process {
foreach ($item in $Id) {
try {
_callAPI -Method Patch -Area "distributedtask/pools/$PoolId" -Resource agents -Id $item -Version $([VSTeamVersions]::DistributedTask) -ContentType "application/json" -Body "{'enabled':true,'id':$item,'maxParallelism':1}" | Out-Null
_callAPI -Method Patch -Area "distributedtask/pools/$PoolId" -Resource agents -Id $item -Version $([VSTeamVersions]::DistributedTask) -ContentType "application/json;charset=utf-8" -Body "{'enabled':true,'id':$item,'maxParallelism':1}" | Out-Null
Write-Output "Enabled agent $item"
}
catch {
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Get-VSTeamPermissionInheritance.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}
"@

$resp = _callAPI -method POST -area "Contribution" -resource "HierarchyQuery/project" -id $projectID -Version $version -ContentType "application/json" -Body $body
$resp = _callAPI -method POST -area "Contribution" -resource "HierarchyQuery/project" -id $projectID -Version $version -ContentType "application/json;charset=utf-8" -Body $body

Write-Verbose $($resp | ConvertTo-Json -Depth 99)

Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Get-VSTeamWiql.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function Get-VSTeamWiql {
}) | ConvertTo-Json

$resp = _callAPI -ProjectName $ProjectName -Team $Team -Area 'wit' -Resource 'wiql' `
-method "POST" -ContentType "application/json" `
-method "POST" -ContentType "application/json;charset=utf-8" `
-Version $([VSTeamVersions]::Core) `
-Querystring $QueryString `
-Body $body
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Set-VSTeamApproval.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function Set-VSTeamApproval {
try {
# Call the REST API
_callAPI -Method Patch -SubDomain vsrm -ProjectName $ProjectName -Area release -Resource approvals `
-Id $item -Version $([VSTeamVersions]::Release) -body $body -ContentType 'application/json' | Out-Null
-Id $item -Version $([VSTeamVersions]::Release) -body $body -ContentType 'application/json;charset=utf-8' | Out-Null

Write-Output "Approval $item status changed to $status"
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Set-VSTeamEnvironmentStatus.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function Set-VSTeamEnvironmentStatus {
try {
# Call the REST API
_callAPI -Method Patch -SubDomain vsrm -Area release -Resource "releases/$ReleaseId/environments" -projectName $ProjectName -id $item `
-body $body -ContentType 'application/json' -Version $([VSTeamVersions]::Release) | Out-Null
-body $body -ContentType 'application/json;charset=utf-8' -Version $([VSTeamVersions]::Release) | Out-Null

Write-Output "Environment $item status changed to $status"
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Set-VSTeamPermissionInheritance.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}
"@
# Call the REST API to change the inheritance state
$resp = _callAPI -method POST -area "Contribution" -resource "HierarchyQuery" -id $projectID -Version $version -ContentType "application/json" -Body $body
$resp = _callAPI -method POST -area "Contribution" -resource "HierarchyQuery" -id $projectID -Version $version -ContentType "application/json;charset=utf-8" -Body $body
}

Write-Verbose "Result: $(ConvertTo-Json -InputObject $resp -Depth 100)"
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Set-VSTeamReleaseStatus.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function Set-VSTeamReleaseStatus {
try {
# Call the REST API
_callAPI -Method Patch -SubDomain vsrm -Area release -Resource releases -projectName $ProjectName -id $item `
-body $body -ContentType 'application/json' -Version $([VSTeamVersions]::Release) | Out-Null
-body $body -ContentType 'application/json;charset=utf-8' -Version $([VSTeamVersions]::Release) | Out-Null

Write-Output "Release $item status changed to $status"
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Update-VSTeam.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function Update-VSTeam {

# Call the REST API
$resp = _callAPI -Area 'projects' -Resource "$ProjectName/teams" -Id $Name `
-Method Patch -ContentType 'application/json' -Body $body -Version $([VSTeamVersions]::Core)
-Method Patch -ContentType 'application/json;charset=utf-8' -Body $body -Version $([VSTeamVersions]::Core)

# Storing the object before you return it cleaned up the pipeline.
# When I just write the object from the constructor each property
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Update-VSTeamBuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function Update-VSTeamBuild {

# Call the REST API
_callAPI -ProjectName $ProjectName -Area 'build' -Resource 'builds' -Id $Id `
-Method Patch -ContentType 'application/json' -body $body -Version $([VSTeamVersions]::Build) | Out-Null
-Method Patch -ContentType 'application/json;charset=utf-8' -body $body -Version $([VSTeamVersions]::Build) | Out-Null
}
}
}
4 changes: 2 additions & 2 deletions Source/Public/Update-VSTeamBuildDefinition.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ function Update-VSTeamBuildDefinition {
# Call the REST API

if ($InFile) {
_callAPI -Method Put -ProjectName $ProjectName -Area build -Resource definitions -Id $Id -Version $([VSTeamVersions]::Build) -InFile $InFile -ContentType 'application/json' | Out-Null
_callAPI -Method Put -ProjectName $ProjectName -Area build -Resource definitions -Id $Id -Version $([VSTeamVersions]::Build) -InFile $InFile -ContentType 'application/json;charset=utf-8' | Out-Null
}
else {
_callAPI -Method Put -ProjectName $ProjectName -Area build -Resource definitions -Id $Id -Version $([VSTeamVersions]::Build) -Body $BuildDefinition -ContentType 'application/json' | Out-Null
_callAPI -Method Put -ProjectName $ProjectName -Area build -Resource definitions -Id $Id -Version $([VSTeamVersions]::Build) -Body $BuildDefinition -ContentType 'application/json;charset=utf-8' | Out-Null
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Update-VSTeamExtension.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function Update-VSTeamExtension {

$body = $obj | ConvertTo-Json

$resp = _callAPI -Method Patch -body $body -SubDomain 'extmgmt' -Resource 'extensionmanagement/installedextensions' -Version $([VSTeamVersions]::ExtensionsManagement) -ContentType "application/json"
$resp = _callAPI -Method Patch -body $body -SubDomain 'extmgmt' -Resource 'extensionmanagement/installedextensions' -Version $([VSTeamVersions]::ExtensionsManagement) -ContentType "application/json;charset=utf-8"

$item = [VSTeamExtension]::new($resp)

Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Update-VSTeamPolicy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function Update-VSTeamPolicy {
if ($Force -or $pscmdlet.ShouldProcess($id, "Update Policy")) {
# Call the REST API
$resp = _callAPI -ProjectName $ProjectName -Area 'policy' -id $id -Resource 'configurations' `
-Method Put -ContentType 'application/json' -Body $body -Version $([VSTeamVersions]::Git)
-Method Put -ContentType 'application/json;charset=utf-8' -Body $body -Version $([VSTeamVersions]::Git)

Write-Output $resp
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Update-VSTeamProject.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function Update-VSTeamProject {

# Call the REST API
$resp = _callAPI -Area 'projects' -id $id `
-Method Patch -ContentType 'application/json' -body $body -Version $([VSTeamVersions]::Core)
-Method Patch -ContentType 'application/json;charset=utf-8' -body $body -Version $([VSTeamVersions]::Core)

_trackProjectProgress -resp $resp -title 'Updating team project' -msg $msg

Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Update-VSTeamRelease.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function Update-VSTeamRelease {
if ($Force -or $pscmdlet.ShouldProcess($Id, "Update Release")) {
# Call the REST API
$resp = _callAPI -ProjectName $projectName -SubDomain vsrm -Area release -Resource releases -Id $id `
-Method Put -ContentType 'application/json' -body $body -Version $([VSTeamVersions]::Release)
-Method Put -ContentType 'application/json;charset=utf-8' -body $body -Version $([VSTeamVersions]::Release)

Write-Output $resp
}
Expand Down
4 changes: 2 additions & 2 deletions Source/Public/Update-VSTeamReleaseDefinition.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ function Update-VSTeamReleaseDefinition {
# Call the REST API

if ($InFile) {
_callAPI -Method Put -ProjectName $ProjectName -SubDomain vsrm -Area Release -Resource definitions -Version $([VSTeamVersions]::Release) -InFile $InFile -ContentType 'application/json' | Out-Null
_callAPI -Method Put -ProjectName $ProjectName -SubDomain vsrm -Area Release -Resource definitions -Version $([VSTeamVersions]::Release) -InFile $InFile -ContentType 'application/json;charset=utf-8' | Out-Null
}
else {
_callAPI -Method Put -ProjectName $ProjectName -SubDomain vsrm -Area Release -Resource definitions -Version $([VSTeamVersions]::Release) -Body $ReleaseDefinition -ContentType 'application/json' | Out-Null
_callAPI -Method Put -ProjectName $ProjectName -SubDomain vsrm -Area Release -Resource definitions -Version $([VSTeamVersions]::Release) -Body $ReleaseDefinition -ContentType 'application/json;charset=utf-8' | Out-Null
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Update-VSTeamServiceEndpoint.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function Update-VSTeamServiceEndpoint {
if ($Force -or $pscmdlet.ShouldProcess($id, "Update Service Endpoint")) {
# Call the REST API
$resp = _callAPI -ProjectName $projectName -Area 'distributedtask' -Resource 'serviceendpoints' -Id $id `
-Method Put -ContentType 'application/json' -body $body -Version $([VSTeamVersions]::DistributedTask)
-Method Put -ContentType 'application/json;charset=utf-8' -body $body -Version $([VSTeamVersions]::DistributedTask)

_trackServiceEndpointProgress -projectName $projectName -resp $resp -title 'Updating Service Endpoint' -msg "Updating $id"

Expand Down
4 changes: 2 additions & 2 deletions Source/Public/Update-VSTeamTaskGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ function Update-VSTeamTaskGroup {

if ($Force -or $pscmdlet.ShouldProcess("Update Task Group")) {
if ($InFile) {
$resp = _callAPI -Method Put -ProjectName $ProjectName -Area distributedtask -Resource taskgroups -Version $([VSTeamVersions]::TaskGroups) -InFile $InFile -ContentType 'application/json' -Id $Id
$resp = _callAPI -Method Put -ProjectName $ProjectName -Area distributedtask -Resource taskgroups -Version $([VSTeamVersions]::TaskGroups) -InFile $InFile -ContentType 'application/json;charset=utf-8' -Id $Id
}
else {
$resp = _callAPI -Method Put -ProjectName $ProjectName -Area distributedtask -Resource taskgroups -Version $([VSTeamVersions]::TaskGroups) -Body $Body -ContentType 'application/json' -Id $Id
$resp = _callAPI -Method Put -ProjectName $ProjectName -Area distributedtask -Resource taskgroups -Version $([VSTeamVersions]::TaskGroups) -Body $Body -ContentType 'application/json;charset=utf-8' -Id $Id
}
}

Expand Down
Loading

0 comments on commit 5ad6cf7

Please sign in to comment.