mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 09:58:04 +08:00
chore: improve webhook (#25998)
This commit is contained in:
@ -63,8 +63,6 @@ import {
|
||||
import { WorkflowHistoryEvent, useWorkflowHistory } from './use-workflow-history'
|
||||
import useInspectVarsCrud from './use-inspect-vars-crud'
|
||||
import { getNodeUsedVars } from '../nodes/_base/components/variable/utils'
|
||||
import { deleteWebhookUrl } from '@/service/apps'
|
||||
import { useStore as useAppStore } from '@/app/components/app/store'
|
||||
|
||||
// Entry node deletion restriction has been removed to allow empty workflows
|
||||
|
||||
@ -76,7 +74,7 @@ export const useNodesInteractions = () => {
|
||||
const reactflow = useReactFlow()
|
||||
const { store: workflowHistoryStore } = useWorkflowHistoryStore()
|
||||
const { handleSyncWorkflowDraft } = useNodesSyncDraft()
|
||||
const appId = useAppStore.getState().appDetail?.id
|
||||
|
||||
const {
|
||||
checkNestedParallelLimit,
|
||||
getAfterNodesInSameBranch,
|
||||
@ -592,17 +590,6 @@ export const useNodesInteractions = () => {
|
||||
|
||||
deleteNodeInspectorVars(nodeId)
|
||||
|
||||
if (currentNode.data.type === BlockEnum.TriggerWebhook) {
|
||||
if (appId) {
|
||||
try {
|
||||
deleteWebhookUrl({ appId, nodeId })
|
||||
}
|
||||
catch (error) {
|
||||
console.error('Failed to delete webhook URL:', error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (currentNode.data.type === BlockEnum.Iteration) {
|
||||
const iterationChildren = nodes.filter(node => node.parentId === currentNode.id)
|
||||
|
||||
|
||||
@ -26,14 +26,6 @@ const nodeDefault: NodeDefault<WebhookTriggerNodeType> = {
|
||||
return nodes.filter(type => type !== BlockEnum.Start)
|
||||
},
|
||||
checkValid(payload: WebhookTriggerNodeType, t: any) {
|
||||
// Validate webhook configuration
|
||||
if (!payload.webhook_url) {
|
||||
return {
|
||||
isValid: false,
|
||||
errorMessage: t('workflow.nodes.triggerWebhook.validation.webhookUrlRequired'),
|
||||
}
|
||||
}
|
||||
|
||||
// Validate parameter types for params and body
|
||||
const parametersWithTypes = [
|
||||
...(payload.params || []),
|
||||
|
||||
Reference in New Issue
Block a user