refactor: Trim down the response on the Workflows listing endpoint (#4726)
* fix: Avoid hashing workflows in the listing page * stop returning full nodes data on the listings page when sharing is enabled * fix the relations array for workflow listing * add a comment explaining the hash skipping hack
This commit is contained in:
committed by
GitHub
parent
39a5dc57a8
commit
1579d05fd1
@@ -85,9 +85,7 @@ export class EEWorkflowsService extends WorkflowsService {
|
||||
return transaction.save(newSharedWorkflows);
|
||||
}
|
||||
|
||||
static addOwnerAndSharings(
|
||||
workflow: WorkflowWithSharingsAndCredentials,
|
||||
): WorkflowWithSharingsAndCredentials {
|
||||
static addOwnerAndSharings(workflow: WorkflowWithSharingsAndCredentials): void {
|
||||
workflow.ownedBy = null;
|
||||
workflow.sharedWith = [];
|
||||
workflow.usedCredentials = [];
|
||||
@@ -104,14 +102,12 @@ export class EEWorkflowsService extends WorkflowsService {
|
||||
});
|
||||
|
||||
delete workflow.shared;
|
||||
|
||||
return workflow;
|
||||
}
|
||||
|
||||
static async addCredentialsToWorkflow(
|
||||
workflow: WorkflowWithSharingsAndCredentials,
|
||||
currentUser: User,
|
||||
): Promise<WorkflowWithSharingsAndCredentials> {
|
||||
): Promise<void> {
|
||||
workflow.usedCredentials = [];
|
||||
const userCredentials = await EECredentials.getAll(currentUser);
|
||||
const credentialIdsUsedByWorkflow = new Set<number>();
|
||||
@@ -155,8 +151,6 @@ export class EEWorkflowsService extends WorkflowsService {
|
||||
});
|
||||
workflow.usedCredentials?.push(workflowCredential);
|
||||
});
|
||||
|
||||
return workflow;
|
||||
}
|
||||
|
||||
static validateCredentialPermissionsToUser(
|
||||
|
||||
Reference in New Issue
Block a user