perf: Improve workflows list performance (#5021)

* spike: Improve workflow list performance

* fix: Correcting override behavior

* refactor: Remove unnecessary promise

* remove duplicate code

* remove the `async` that is breaking the listings page

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Omar Ajoue
2022-12-23 13:58:34 +01:00
committed by GitHub
parent a12606828e
commit bb0eedada9
5 changed files with 92 additions and 71 deletions

View File

@@ -125,17 +125,6 @@ export class CredentialsService {
return Db.collections.SharedCredentials.findOne(options);
}
static createCredentialsFromCredentialsEntity(
credential: CredentialsEntity,
encrypt = false,
): Credentials {
const { id, name, type, nodesAccess, data } = credential;
if (encrypt) {
return new Credentials({ id: null, name }, type, nodesAccess);
}
return new Credentials({ id: id.toString(), name }, type, nodesAccess, data);
}
static async prepareCreateData(
data: CredentialRequest.CredentialProperties,
): Promise<CredentialsEntity> {