mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor(core): Allow custom types on getCredentials (no-changelog) (#10567)
This commit is contained in:
committed by
GitHub
parent
52c574d83f
commit
be52176585
@@ -126,7 +126,7 @@ export class Totp implements INodeType {
|
||||
const returnData: INodeExecutionData[] = [];
|
||||
|
||||
const operation = this.getNodeParameter('operation', 0);
|
||||
const credentials = (await this.getCredentials('totpApi')) as { label: string; secret: string };
|
||||
const credentials = await this.getCredentials<{ label: string; secret: string }>('totpApi');
|
||||
|
||||
if (!credentials.label.includes(':')) {
|
||||
throw new NodeOperationError(this.getNode(), 'Malformed label - expected `issuer:username`');
|
||||
|
||||
Reference in New Issue
Block a user