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:
@@ -6,7 +6,8 @@ import type {
|
||||
ILoadOptionsFunctions,
|
||||
IWebhookFunctions,
|
||||
} from 'n8n-core';
|
||||
import type { IDataObject } from 'n8n-workflow';
|
||||
|
||||
import type { IDataObject, JsonObject } from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
export async function salesmateApiRequest(
|
||||
@@ -38,13 +39,13 @@ export async function salesmateApiRequest(
|
||||
uri: uri || `https://apis.salesmate.io${resource}`,
|
||||
json: true,
|
||||
};
|
||||
if (!Object.keys(body).length) {
|
||||
if (!Object.keys(body as IDataObject).length) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +65,7 @@ export async function salesmateApiRequestAllItems(
|
||||
query.rows = 25;
|
||||
do {
|
||||
responseData = await salesmateApiRequest.call(this, method, resource, body, query);
|
||||
returnData.push.apply(returnData, responseData[propertyName].data);
|
||||
returnData.push.apply(returnData, responseData[propertyName].data as IDataObject[]);
|
||||
query.pageNo++;
|
||||
} while (
|
||||
responseData[propertyName].totalPages !== undefined &&
|
||||
|
||||
Reference in New Issue
Block a user