mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Decouple workflow created, saved, deleted events from internal hooks (no-changelog) (#10264)
This commit is contained in:
@@ -179,8 +179,13 @@ export class WorkflowsController {
|
||||
delete savedWorkflowWithMetaData.shared;
|
||||
|
||||
await this.externalHooks.run('workflow.afterCreate', [savedWorkflow]);
|
||||
this.internalHooks.onWorkflowCreated(req.user, newWorkflow, project!, false);
|
||||
this.eventService.emit('workflow-created', { user: req.user, workflow: newWorkflow });
|
||||
this.eventService.emit('workflow-created', {
|
||||
user: req.user,
|
||||
workflow: newWorkflow,
|
||||
publicApi: false,
|
||||
projectId: project!.id,
|
||||
projectType: project!.type,
|
||||
});
|
||||
|
||||
const scopes = await this.workflowService.getWorkflowScopes(req.user, savedWorkflow.id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user