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:
@@ -7,7 +7,7 @@ import type {
|
||||
ILoadOptionsFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import type { IDataObject, IOAuth2Options } from 'n8n-workflow';
|
||||
import type { IDataObject, IOAuth2Options, JsonObject } from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
export async function boxApiRequest(
|
||||
@@ -33,7 +33,7 @@ export async function boxApiRequest(
|
||||
options = Object.assign({}, options, option);
|
||||
|
||||
try {
|
||||
if (Object.keys(body).length === 0) {
|
||||
if (Object.keys(body as IDataObject).length === 0) {
|
||||
delete options.body;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ export async function boxApiRequest(
|
||||
//@ts-ignore
|
||||
return await this.helpers.requestOAuth2.call(this, 'boxOAuth2Api', options, oAuth2Options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ export async function boxApiRequestAllItems(
|
||||
do {
|
||||
responseData = await boxApiRequest.call(this, method, endpoint, body, query);
|
||||
query.offset = (responseData.offset as number) + query.limit;
|
||||
returnData.push.apply(returnData, responseData[propertyName]);
|
||||
returnData.push.apply(returnData, responseData[propertyName] as IDataObject[]);
|
||||
} while (responseData[propertyName].length !== 0);
|
||||
|
||||
return returnData;
|
||||
|
||||
Reference in New Issue
Block a user