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:
@@ -7,7 +7,7 @@ import type {
|
||||
ILoadOptionsFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import type { IDataObject } from 'n8n-workflow';
|
||||
import type { IDataObject, JsonObject } from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
export async function mailerliteApiRequest(
|
||||
@@ -32,13 +32,13 @@ export async function mailerliteApiRequest(
|
||||
json: true,
|
||||
};
|
||||
try {
|
||||
if (Object.keys(body).length === 0) {
|
||||
if (Object.keys(body as IDataObject).length === 0) {
|
||||
delete options.body;
|
||||
}
|
||||
//@ts-ignore
|
||||
return await this.helpers.request.call(this, options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ export async function mailerliteApiRequestAllItems(
|
||||
|
||||
do {
|
||||
responseData = await mailerliteApiRequest.call(this, method, endpoint, body, query);
|
||||
returnData.push.apply(returnData, responseData);
|
||||
returnData.push.apply(returnData, responseData as IDataObject[]);
|
||||
query.offset = query.offset + query.limit;
|
||||
} while (responseData.length !== 0);
|
||||
return returnData;
|
||||
|
||||
Reference in New Issue
Block a user