Skip to content

Commit

Permalink
Fix json pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed Jun 16, 2022
1 parent 324eb1f commit 9abce63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,10 @@ async function installPipeline({

const esClientParams = {
id: pipelineToInstall.nameForInstallation,
body: pipelineToInstall.contentForInstallation,
body:
pipelineToInstall.extension === 'yml'
? pipelineToInstall.contentForInstallation
: JSON.parse(pipelineToInstall.contentForInstallation),
};

const esClientRequestOptions: TransportRequestOptions = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ export function appendMetadataToIngestPipeline({

return {
...pipeline,
contentForInstallation: parsedPipelineContent,
contentForInstallation: JSON.stringify(parsedPipelineContent),
};
}

0 comments on commit 9abce63

Please sign in to comment.