mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core): Remove linting exceptions in nodes-base, @typescript-eslint/no-unsafe-argument (no-changelog)
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import type { IExecuteFunctions, IHookFunctions } from 'n8n-core';
|
||||
|
||||
import type { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
|
||||
import type {
|
||||
IDataObject,
|
||||
ILoadOptionsFunctions,
|
||||
INodePropertyOptions,
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import type { OptionsWithUri } from 'request';
|
||||
@@ -70,9 +75,9 @@ export async function goToWebinarApiRequest(
|
||||
}
|
||||
|
||||
// https://stackoverflow.com/questions/62190724/getting-gotowebinar-registrant
|
||||
return losslessJSON.parse(response, convertLosslessNumber);
|
||||
return losslessJSON.parse(response as string, convertLosslessNumber);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,12 +105,12 @@ export async function goToWebinarApiRequestAllItems(
|
||||
do {
|
||||
responseData = await goToWebinarApiRequest.call(this, method, endpoint, qs, body);
|
||||
|
||||
if (responseData.page && parseInt(responseData.page.totalElements, 10) === 0) {
|
||||
if (responseData.page && parseInt(responseData.page.totalElements as string, 10) === 0) {
|
||||
return [];
|
||||
} else if (responseData._embedded?.[key]) {
|
||||
returnData.push(...responseData._embedded[key]);
|
||||
returnData.push(...(responseData._embedded[key] as IDataObject[]));
|
||||
} else {
|
||||
returnData.push(...responseData);
|
||||
returnData.push(...(responseData as IDataObject[]));
|
||||
}
|
||||
|
||||
if (qs.limit && returnData.length >= qs.limit) {
|
||||
@@ -114,7 +119,7 @@ export async function goToWebinarApiRequestAllItems(
|
||||
}
|
||||
} while (
|
||||
responseData.totalElements &&
|
||||
parseInt(responseData.totalElements, 10) > returnData.length
|
||||
parseInt(responseData.totalElements as string, 10) > returnData.length
|
||||
);
|
||||
|
||||
return returnData;
|
||||
|
||||
Reference in New Issue
Block a user