mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(Cortex Node): Fix issue that not all Analyzers got returned (#3606)
* Updated Cortex analyzer search url to fetch all * Updated Cortex credentials * Nodelinter fixes * More fixes
This commit is contained in:
committed by
GitHub
parent
522b31a47b
commit
6e595c7276
@@ -2,12 +2,6 @@ import {
|
||||
OptionsWithUri,
|
||||
} from 'request';
|
||||
|
||||
import {
|
||||
IAnalyzer,
|
||||
IJob,
|
||||
IResponder,
|
||||
} from './AnalyzerInterface';
|
||||
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
IExecuteSingleFunctions,
|
||||
@@ -25,10 +19,8 @@ export async function cortexApiRequest(this: IHookFunctions | IExecuteFunctions
|
||||
|
||||
const credentials = await this.getCredentials('cortexApi');
|
||||
|
||||
const headerWithAuthentication = Object.assign({}, { Authorization: ` Bearer ${credentials.cortexApiKey}` });
|
||||
|
||||
let options: OptionsWithUri = {
|
||||
headers: headerWithAuthentication,
|
||||
headers: {},
|
||||
method,
|
||||
qs: query,
|
||||
uri: uri || `${credentials.host}/api${resource}`,
|
||||
@@ -47,7 +39,7 @@ export async function cortexApiRequest(this: IHookFunctions | IExecuteFunctions
|
||||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
return await this.helpers.requestWithAuthentication.call(this, 'cortexApi', options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user