rm unused ensureWebhookRawVariable

This commit is contained in:
hjlarry
2025-10-17 13:49:33 +08:00
parent 771cc72dcf
commit d90ffbcf14
2 changed files with 2 additions and 33 deletions

View File

@ -10,16 +10,3 @@ export const createWebhookRawVariable = (): Variable => ({
value_selector: [],
required: true,
})
type WithVariables = {
variables?: Variable[]
}
export const ensureWebhookRawVariable = <T extends WithVariables>(payload: T): void => {
if (!payload.variables)
payload.variables = []
const hasRawVariable = payload.variables.some(variable => variable.variable === WEBHOOK_RAW_VARIABLE_NAME)
if (!hasRawVariable)
payload.variables.push(createWebhookRawVariable())
}