From 67207eb171f3364b7fe73aa904d8494ee22f26cb Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 30 May 2024 13:18:56 -0700 Subject: [PATCH] Fix endpoint URL interpolation issue in getCurlCode (#2026) * chore: Update getCurlCode to fix endpoint URL interpolation issue --- src/frontend/src/modals/apiModal/utils/get-curl-code.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/modals/apiModal/utils/get-curl-code.tsx b/src/frontend/src/modals/apiModal/utils/get-curl-code.tsx index 48be0ceeb..88b78c41b 100644 --- a/src/frontend/src/modals/apiModal/utils/get-curl-code.tsx +++ b/src/frontend/src/modals/apiModal/utils/get-curl-code.tsx @@ -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: '\\` : "" }