Skip to content

Commit

Permalink
Revert "chore: refactor variable processing, add notes"
Browse files Browse the repository at this point in the history
This reverts commit 8b81c77.
  • Loading branch information
kevinkim-ogp committed Dec 19, 2024
1 parent 8b81c77 commit 6992e34
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions packages/backend/src/helpers/compute-parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6992e34

Please sign in to comment.