refactor: Use string ids on Credentials, Workflows, Tags, and Executions DB entities (#5041)
This commit is contained in:
committed by
GitHub
parent
8bee04cd2a
commit
ee28213538
@@ -17,11 +17,11 @@ import { getLicense } from '@/License';
|
||||
import { WhereClause } from '@/Interfaces';
|
||||
import { RoleService } from '@/role/role.service';
|
||||
|
||||
export async function getWorkflowOwner(workflowId: string | number): Promise<User> {
|
||||
export async function getWorkflowOwner(workflowId: string): Promise<User> {
|
||||
const workflowOwnerRole = await RoleService.get({ name: 'owner', scope: 'workflow' });
|
||||
|
||||
const sharedWorkflow = await Db.collections.SharedWorkflow.findOneOrFail({
|
||||
where: { workflow: { id: workflowId }, role: workflowOwnerRole },
|
||||
where: { workflowId, role: workflowOwnerRole },
|
||||
relations: ['user', 'user.globalRole'],
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user