mirror of
https://github.com/langgenius/dify.git
synced 2026-04-30 23:48:04 +08:00
rm unused ensureWebhookRawVariable
This commit is contained in:
@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user