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:
@@ -10,7 +10,7 @@ import type {
|
||||
IWebhookFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import type { ICredentialDataDecryptedObject, IDataObject } from 'n8n-workflow';
|
||||
import type { ICredentialDataDecryptedObject, IDataObject, JsonObject } from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import flow from 'lodash.flow';
|
||||
@@ -62,14 +62,14 @@ export async function copperApiRequest(
|
||||
delete options.qs;
|
||||
}
|
||||
|
||||
if (Object.keys(options.body).length === 0) {
|
||||
if (Object.keys(options.body as IDataObject).length === 0) {
|
||||
delete options.body;
|
||||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ export async function copperApiRequestAllItems(
|
||||
do {
|
||||
responseData = await copperApiRequest.call(this, method, resource, body, qs, uri, option);
|
||||
totalItems = responseData.headers['x-pw-total'];
|
||||
returnData.push(...responseData.body);
|
||||
returnData.push(...(responseData.body as IDataObject[]));
|
||||
} while (totalItems > returnData.length);
|
||||
|
||||
return returnData;
|
||||
|
||||
Reference in New Issue
Block a user