mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-23 11:44:06 -08:00
⚡ Save on new workflow executions with webhook (#2231)
* save on new workflow executions * only save if webhook node
This commit is contained in:
parent
f7148bdd77
commit
7159181345
|
@ -140,6 +140,12 @@ export const workflowRun = mixins(
|
|||
startNodes.push(nodeName);
|
||||
}
|
||||
|
||||
const isNewWorkflow = this.$store.getters.isNewWorkflow;
|
||||
const hasWebhookNode = this.$store.getters.currentWorkflowHasWebhookNode;
|
||||
if (isNewWorkflow && hasWebhookNode) {
|
||||
await this.saveCurrentWorkflow();
|
||||
}
|
||||
|
||||
const workflowData = await this.getWorkflowDataToSave();
|
||||
|
||||
const startRunData: IStartRunData = {
|
||||
|
|
|
@ -606,6 +606,10 @@ export const store = new Vuex.Store({
|
|||
return state.workflow.id === PLACEHOLDER_EMPTY_WORKFLOW_ID;
|
||||
},
|
||||
|
||||
currentWorkflowHasWebhookNode: (state: IRootState): boolean => {
|
||||
return !!state.workflow.nodes.find((node: INodeUi) => !!node.webhookId);
|
||||
},
|
||||
|
||||
getActiveExecutions: (state): IExecutionsCurrentSummaryExtended[] => {
|
||||
return state.activeExecutions;
|
||||
},
|
||||
|
@ -790,6 +794,7 @@ export const store = new Vuex.Store({
|
|||
workflowId: (state): string => {
|
||||
return state.workflow.id;
|
||||
},
|
||||
|
||||
workflowSettings: (state): IWorkflowSettings => {
|
||||
if (state.workflow.settings === undefined) {
|
||||
return {};
|
||||
|
|
Loading…
Reference in a new issue