refactor(core): Move all user DB access to UserRepository (#6910)
Prep for https://linear.app/n8n/issue/PAY-646
This commit is contained in:
@@ -7,7 +7,7 @@ import type { ICredentialsDb } from '@/Interfaces';
|
||||
import { SharedWorkflow } from '@db/entities/SharedWorkflow';
|
||||
import type { User } from '@db/entities/User';
|
||||
import { WorkflowEntity } from '@db/entities/WorkflowEntity';
|
||||
import { UserService } from '@/user/user.service';
|
||||
import { UserService } from '@/services/user.service';
|
||||
import { WorkflowsService } from './workflows.services';
|
||||
import type {
|
||||
CredentialUsedByWorkflow,
|
||||
@@ -61,7 +61,7 @@ export class EEWorkflowsService extends WorkflowsService {
|
||||
workflow: WorkflowEntity,
|
||||
shareWithIds: string[],
|
||||
): Promise<SharedWorkflow[]> {
|
||||
const users = await UserService.getByIds(transaction, shareWithIds);
|
||||
const users = await Container.get(UserService).getByIds(transaction, shareWithIds);
|
||||
const role = await Container.get(RoleService).findWorkflowEditorRole();
|
||||
|
||||
const newSharedWorkflows = users.reduce<SharedWorkflow[]>((acc, user) => {
|
||||
|
||||
Reference in New Issue
Block a user