mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Remove linting exceptions in nodes-base, @typescript-eslint/no-unsafe-argument (no-changelog)
This commit is contained in:
@@ -2,7 +2,7 @@ import type { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions } from 'n
|
||||
|
||||
import type { OptionsWithUri } from 'request';
|
||||
|
||||
import type { IDataObject, IPollFunctions } from 'n8n-workflow';
|
||||
import type { IDataObject, IPollFunctions, JsonObject } from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
/**
|
||||
@@ -43,7 +43,7 @@ export async function apiRequest(
|
||||
try {
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ export async function apiRequestAllItems(
|
||||
endpoint: string,
|
||||
body: IDataObject = {},
|
||||
query: IDataObject = {},
|
||||
): Promise<any> {
|
||||
) {
|
||||
query.maxrecord = 100;
|
||||
|
||||
query.offset = 0;
|
||||
@@ -70,7 +70,7 @@ export async function apiRequestAllItems(
|
||||
|
||||
do {
|
||||
responseData = await apiRequest.call(this, method, endpoint, body, query);
|
||||
returnData.push.apply(returnData, responseData);
|
||||
returnData.push.apply(returnData, responseData as IDataObject[]);
|
||||
query.offset += query.maxrecord;
|
||||
} while (responseData.length !== 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user