mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Decouple emailing and workflow sharing from internal hooks (no-changelog) (#10326)
This commit is contained in:
@@ -17,7 +17,6 @@ import { validateEntity } from '@/GenericHelpers';
|
||||
import { ExternalHooks } from '@/ExternalHooks';
|
||||
import { WorkflowService } from './workflow.service';
|
||||
import { License } from '@/License';
|
||||
import { InternalHooks } from '@/InternalHooks';
|
||||
import * as utils from '@/utils';
|
||||
import { listQueryMiddleware } from '@/middlewares';
|
||||
import { TagService } from '@/services/tag.service';
|
||||
@@ -49,7 +48,6 @@ import { GlobalConfig } from '@n8n/config';
|
||||
export class WorkflowsController {
|
||||
constructor(
|
||||
private readonly logger: Logger,
|
||||
private readonly internalHooks: InternalHooks,
|
||||
private readonly externalHooks: ExternalHooks,
|
||||
private readonly tagRepository: TagRepository,
|
||||
private readonly enterpriseWorkflowService: EnterpriseWorkflowService,
|
||||
@@ -459,7 +457,11 @@ export class WorkflowsController {
|
||||
newShareeIds = toShare;
|
||||
});
|
||||
|
||||
this.internalHooks.onWorkflowSharingUpdate(workflowId, req.user.id, shareWithIds);
|
||||
this.eventService.emit('workflow-sharing-updated', {
|
||||
workflowId,
|
||||
userIdSharer: req.user.id,
|
||||
userIdList: shareWithIds,
|
||||
});
|
||||
|
||||
const projectsRelations = await this.projectRelationRepository.findBy({
|
||||
projectId: In(newShareeIds),
|
||||
|
||||
Reference in New Issue
Block a user