Fix endpoint URL interpolation issue in getCurlCode (#2026)

* chore: Update getCurlCode to fix endpoint URL interpolation issue
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-05-30 13:18:56 -07:00 committed by GitHub
commit 67207eb171
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,9 +13,9 @@ export default function getCurlCode(
const tweaksObject = tweaksBuildedObject[0];
// show the endpoint name in the curl command if it exists
return `curl -X POST \\
${window.location.protocol}//${window.location.host}/api/v1/run/${
"${window.location.protocol}//${window.location.host}/api/v1/run/${
endpointName || flowId
}?stream=false \\
}?stream=false" \\
-H 'Content-Type: application/json'\\${
!isAuth ? `\n -H 'x-api-key: <your api key>'\\` : ""
}