[8.11] [SecuritySolution] Fix broken delete timeline note request (#168739) (#168806)

# Backport

This will backport the following commits from `main` to `8.11`:
- [[SecuritySolution] Fix broken delete timeline note request
(#168739)](https://github.com/elastic/kibana/pull/168739)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jan
Monschke","email":"jan.monschke@elastic.co"},"sourceCommit":{"committedDate":"2023-10-13T07:03:04Z","message":"[SecuritySolution]
Fix broken delete timeline note request (#168739)\n\n##
Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/168738\r\n\r\nThe delete
request for timeline notes was missing the `version`
header.","sha":"5499a47401b0c02b0ae105bd56b4ed2dafa14edf","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:Threat
Hunting:Investigations","backport:prev-minor","v8.12.0"],"number":168739,"url":"https://github.com/elastic/kibana/pull/168739","mergeCommit":{"message":"[SecuritySolution]
Fix broken delete timeline note request (#168739)\n\n##
Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/168738\r\n\r\nThe delete
request for timeline notes was missing the `version`
header.","sha":"5499a47401b0c02b0ae105bd56b4ed2dafa14edf"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/168739","number":168739,"mergeCommit":{"message":"[SecuritySolution]
Fix broken delete timeline note request (#168739)\n\n##
Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/168738\r\n\r\nThe delete
request for timeline notes was missing the `version`
header.","sha":"5499a47401b0c02b0ae105bd56b4ed2dafa14edf"}}]}]
BACKPORT-->

Co-authored-by: Jan Monschke <jan.monschke@elastic.co>
This commit is contained in:
Kibana Machine 2023-10-13 04:35:10 -04:00 committed by GitHub
parent 12a59a2521
commit 10ab162d38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,6 +112,7 @@ function useDeleteNote(noteId: string | null | undefined) {
return http.fetch('/api/note', {
method: 'DELETE',
body: JSON.stringify({ noteId: id }),
version: '2023-10-31',
});
},
onSuccess: () => {