Skip to content

Commit eb87e9a

Browse files
author
SimonDeeb
committed
fix content type
1 parent 133459d commit eb87e9a

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

AzureDevOpsPowerShell/Public/Api/Work/WorkItems/New-AzDoWorkItem.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,11 @@ function New-AzDoWorkItem {
9393
}
9494

9595
$params = @{
96-
uri = "$CollectionUri/$ProjectName/_apis/wit/workitems/`$$($_.WorkItemType)"
97-
method = 'POST'
98-
version = '7.1-preview.3'
99-
body = $body
96+
uri = "$CollectionUri/$ProjectName/_apis/wit/workitems/`$$($_.WorkItemType)"
97+
method = 'POST'
98+
version = '7.1-preview.3'
99+
body = $body
100+
contentType = 'application/json-patch+json'
100101
}
101102

102103
if ($PSCmdlet.ShouldProcess($CollectionUri, "Create work item named: $($PSStyle.Bold)$name$($PSStyle.Reset)")) {

AzureDevOpsPowerShell/Public/Api/Work/WorkItems/Set-AzDoWorkItem.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,11 @@ function Set-AzDoWorkItem {
9494
}
9595

9696
$params = @{
97-
uri = "$CollectionUri/$ProjectName/_apis/wit/workitems/$($_.WorkItemId)"
98-
method = 'PATCH'
99-
version = '7.1-preview.3'
100-
body = $body
97+
uri = "$CollectionUri/$ProjectName/_apis/wit/workitems/$($_.WorkItemId)"
98+
method = 'PATCH'
99+
version = '7.1-preview.3'
100+
body = $body
101+
contentType = 'application/json-patch+json'
101102
}
102103

103104
if ($PSCmdlet.ShouldProcess($CollectionUri, "Setting work item: $($PSStyle.Bold)$($_.WorkItemId)$($PSStyle.Reset)")) {

0 commit comments

Comments
 (0)