diff --git a/x-pack/plugins/ingest_pipelines/server/routes/api/simulate.ts b/x-pack/plugins/ingest_pipelines/server/routes/api/simulate.ts index 78c29d061fe5a..ca5fc78d118fd 100644 --- a/x-pack/plugins/ingest_pipelines/server/routes/api/simulate.ts +++ b/x-pack/plugins/ingest_pipelines/server/routes/api/simulate.ts @@ -33,9 +33,8 @@ export const registerSimulateRoute = ({ }, license.guardApiRoute(async (ctx, req, res) => { const { callAsCurrentUser } = ctx.core.elasticsearch.dataClient; - const reqBody = req.body; - const { pipeline, documents, verbose } = reqBody; + const { pipeline, documents, verbose } = req.body; try { const response = await callAsCurrentUser('ingest.simulate', { diff --git a/x-pack/plugins/ingest_pipelines/server/routes/api/update.ts b/x-pack/plugins/ingest_pipelines/server/routes/api/update.ts index 27a3c9fb97ef8..dd9d818d0ead7 100644 --- a/x-pack/plugins/ingest_pipelines/server/routes/api/update.ts +++ b/x-pack/plugins/ingest_pipelines/server/routes/api/update.ts @@ -36,9 +36,8 @@ export const registerUpdateRoute = ({ license.guardApiRoute(async (ctx, req, res) => { const { callAsCurrentUser } = ctx.core.elasticsearch.dataClient; const { name } = req.params; - const pipeline = req.body as Pipeline; - const { description, processors, version, on_failure } = pipeline; + const { description, processors, version, on_failure } = req.body; try { // Verify pipeline exists; ES will throw 404 if it doesn't