diff --git a/packages/backend/src/helpers/compute-parameters.ts b/packages/backend/src/helpers/compute-parameters.ts index 91019eb97..0af2cac9a 100644 --- a/packages/backend/src/helpers/compute-parameters.ts +++ b/packages/backend/src/helpers/compute-parameters.ts @@ -71,15 +71,10 @@ function findAndSubstituteVariables( : Array.isArray(dataValue) ? dataValue.join(', ') : dataValue - - /** - * NOTE: this is to deal with escaping variables in custom api data field - * be careful with this as it may break other apps if the key 'data' is used - */ - if (parameterKey === 'data') { - return JSON.stringify(processedVar).slice(1, -1) - } - return processedVar + return parameterKey === 'data' + ? // removes " " for custom api data field as its already wrapped + JSON.stringify(processedVar).slice(1, -1) + : processedVar } return part