Skip to content

Commit 6ef920d

Browse files
authored
[ES 9.0] Remove body workaround (@elastic/ml-ui) (#217221)
## Summary Follow up to #213375: The latest version of the ES client fixed the issue elastic/elasticsearch-js#2584. We should be able to remove all usages of `// @ts-expect-error [email protected] https://github.com/elastic/elasticsearch-js/issues/2584`.
1 parent 54094bd commit 6ef920d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

x-pack/platform/plugins/shared/ml/server/routes/data_frame_analytics.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -398,10 +398,7 @@ export function dataFrameAnalyticsRoutes(
398398
routeGuard.fullLicenseAPIGuard(async ({ mlClient, request, response }) => {
399399
try {
400400
const body = await mlClient.explainDataFrameAnalytics(
401-
{
402-
// @ts-expect-error [email protected] https://github.com/elastic/elasticsearch-js/issues/2584 (_meta)
403-
body: request.body,
404-
},
401+
request.body,
405402
getAuthorizationHeader(request)
406403
);
407404
return response.ok({
@@ -648,8 +645,7 @@ export function dataFrameAnalyticsRoutes(
648645
const body = await mlClient.updateDataFrameAnalytics(
649646
{
650647
id: analyticsId,
651-
// @ts-expect-error [email protected] https://github.com/elastic/elasticsearch-js/issues/2584 (_meta)
652-
body: request.body,
648+
...request.body,
653649
},
654650
getAuthorizationHeader(request)
655651
);

0 commit comments

Comments
 (0)