fix: Lazy load nodes for credentials testing (#4760)
This commit is contained in:
committed by
GitHub
parent
3d67df490c
commit
0a7a2f3e41
@@ -106,7 +106,7 @@ EECredentialsController.get(
|
||||
EECredentialsController.post(
|
||||
'/test',
|
||||
ResponseHelper.send(async (req: CredentialRequest.Test): Promise<INodeCredentialTestResult> => {
|
||||
const { credentials, nodeToTestWith } = req.body;
|
||||
const { credentials } = req.body;
|
||||
|
||||
const encryptionKey = await EECredentials.getEncryptionKey();
|
||||
|
||||
@@ -122,7 +122,7 @@ EECredentialsController.post(
|
||||
Object.assign(credentials, { data: decryptedData });
|
||||
}
|
||||
|
||||
return EECredentials.test(req.user, encryptionKey, credentials, nodeToTestWith);
|
||||
return EECredentials.test(req.user, encryptionKey, credentials);
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -113,10 +113,10 @@ credentialsController.get(
|
||||
credentialsController.post(
|
||||
'/test',
|
||||
ResponseHelper.send(async (req: CredentialRequest.Test): Promise<INodeCredentialTestResult> => {
|
||||
const { credentials, nodeToTestWith } = req.body;
|
||||
const { credentials } = req.body;
|
||||
|
||||
const encryptionKey = await CredentialsService.getEncryptionKey();
|
||||
return CredentialsService.test(req.user, encryptionKey, credentials, nodeToTestWith);
|
||||
return CredentialsService.test(req.user, encryptionKey, credentials);
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -282,10 +282,9 @@ export class CredentialsService {
|
||||
user: User,
|
||||
encryptionKey: string,
|
||||
credentials: ICredentialsDecrypted,
|
||||
nodeToTestWith: string | undefined,
|
||||
): Promise<INodeCredentialTestResult> {
|
||||
const helper = new CredentialsHelper(encryptionKey);
|
||||
|
||||
return helper.testCredentials(user, credentials.type, credentials, nodeToTestWith);
|
||||
return helper.testCredentials(user, credentials.type, credentials);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user