mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat: Updated multiple credentials with tests and allow to be used on HTTP Request Node (#3670)
* Notion cred updated * Airtable new cred * revamped twilio cred * urlscanlo revamp cred * Wordpress revamp cred with testing * SendGrid cred revamped * 🐛 Fix imports * 🐛 Fixes imports in urlscanio * Fix airtable cred injection * Fixes notion request, changes way of cred injection * Change auth type from method to generic * Fix minor issues * Fix lint issue Co-authored-by: Omar Ajoue <krynble@gmail.com>
This commit is contained in:
@@ -46,7 +46,6 @@ export class UrlScanIo implements INodeType {
|
||||
{
|
||||
name: 'urlScanIoApi',
|
||||
required: true,
|
||||
testedBy: 'urlScanIoApiTest',
|
||||
},
|
||||
],
|
||||
properties: [
|
||||
@@ -68,39 +67,6 @@ export class UrlScanIo implements INodeType {
|
||||
],
|
||||
};
|
||||
|
||||
methods = {
|
||||
credentialTest: {
|
||||
async urlScanIoApiTest(
|
||||
this: ICredentialTestFunctions,
|
||||
credentials: ICredentialsDecrypted,
|
||||
): Promise<INodeCredentialTestResult> {
|
||||
const { apiKey } = credentials.data as { apiKey: string };
|
||||
|
||||
const options: OptionsWithUri = {
|
||||
headers: {
|
||||
'API-KEY': apiKey,
|
||||
},
|
||||
method: 'GET',
|
||||
uri: 'https://urlscan.io/user/quotas',
|
||||
json: true,
|
||||
};
|
||||
|
||||
try {
|
||||
await this.helpers.request(options);
|
||||
return {
|
||||
status: 'OK',
|
||||
message: 'Authentication successful',
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
status: 'Error',
|
||||
message: error.message,
|
||||
};
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const items = this.getInputData();
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
Reference in New Issue
Block a user