Skip to content

Commit 7f8d682

Browse files
committed
remove save configuration button
1 parent 6b776c5 commit 7f8d682

File tree

13 files changed

+558
-391
lines changed

13 files changed

+558
-391
lines changed

apps/sim/app/api/workflows/[id]/deploy/route.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { and, desc, eq } from 'drizzle-orm'
44
import type { NextRequest } from 'next/server'
55
import { generateRequestId } from '@/lib/core/utils/request'
66
import { removeMcpToolsForWorkflow, syncMcpToolsForWorkflow } from '@/lib/mcp/workflow-mcp-sync'
7+
import { saveTriggerWebhooksForDeploy } from '@/lib/webhooks/deploy'
78
import {
89
deployWorkflow,
910
loadWorkflowFromNormalizedTables,
@@ -130,6 +131,22 @@ export async function POST(request: NextRequest, { params }: { params: Promise<{
130131
return createErrorResponse(`Invalid schedule configuration: ${scheduleValidation.error}`, 400)
131132
}
132133

134+
const triggerSaveResult = await saveTriggerWebhooksForDeploy({
135+
request,
136+
workflowId: id,
137+
workflow: workflowData,
138+
userId: actorUserId,
139+
blocks: normalizedData.blocks,
140+
requestId,
141+
})
142+
143+
if (!triggerSaveResult.success) {
144+
return createErrorResponse(
145+
triggerSaveResult.error?.message || 'Failed to save trigger configuration',
146+
triggerSaveResult.error?.status || 500
147+
)
148+
}
149+
133150
const deployResult = await deployWorkflow({
134151
workflowId: id,
135152
deployedBy: actorUserId,

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/deploy-modal.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,12 @@ export function DeployModal({
663663
</ModalTabsList>
664664

665665
<ModalBody className='min-h-0 flex-1'>
666+
{apiDeployError && (
667+
<div className='mb-3 rounded-[4px] border border-destructive/30 bg-destructive/10 p-3 text-destructive text-sm'>
668+
<div className='font-semibold'>Deployment Error</div>
669+
<div>{apiDeployError}</div>
670+
</div>
671+
)}
666672
<ModalTabsContent value='general'>
667673
<GeneralDeploy
668674
workflowId={workflowId}

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,4 @@ export { Table } from './table/table'
3232
export { Text } from './text/text'
3333
export { TimeInput } from './time-input/time-input'
3434
export { ToolInput } from './tool-input/tool-input'
35-
export { TriggerSave } from './trigger-save/trigger-save'
3635
export { VariablesInput } from './variables-input/variables-input'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/trigger-save/trigger-save.tsx

Lines changed: 0 additions & 348 deletions
This file was deleted.

0 commit comments

Comments
 (0)