mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
Updates webhook UUIDs to a new one when duplicating
This commit is contained in:
parent
967aabbf55
commit
86fa3a6b9e
|
@ -44,6 +44,8 @@ import { workflowHelpers } from "@/components/mixins/workflowHelpers";
|
||||||
import { showMessage } from "@/components/mixins/showMessage";
|
import { showMessage } from "@/components/mixins/showMessage";
|
||||||
import TagsDropdown from "@/components/TagsDropdown.vue";
|
import TagsDropdown from "@/components/TagsDropdown.vue";
|
||||||
import Modal from "./Modal.vue";
|
import Modal from "./Modal.vue";
|
||||||
|
import { v4 as uuidv4} from 'uuid';
|
||||||
|
import { INodeUi } from "../Interface";
|
||||||
|
|
||||||
export default mixins(showMessage, workflowHelpers).extend({
|
export default mixins(showMessage, workflowHelpers).extend({
|
||||||
components: { TagsDropdown, Modal },
|
components: { TagsDropdown, Modal },
|
||||||
|
@ -107,6 +109,13 @@ export default mixins(showMessage, workflowHelpers).extend({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const allNodes = this.$store.getters.allNodes;
|
||||||
|
allNodes.forEach((node: INodeUi) => {
|
||||||
|
if (node.webhookId) {
|
||||||
|
node.webhookId = uuidv4();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.$data.isSaving = true;
|
this.$data.isSaving = true;
|
||||||
|
|
||||||
const saved = await this.saveAsNewWorkflow({name, tags: this.currentTagIds});
|
const saved = await this.saveAsNewWorkflow({name, tags: this.currentTagIds});
|
||||||
|
|
Loading…
Reference in a new issue