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 { OptionsWithUri } from 'request';
|
||||
|
||||
import type { IExecuteFunctions, IHookFunctions } from 'n8n-core';
|
||||
|
||||
import type { IDataObject } from 'n8n-workflow';
|
||||
import type { IDataObject, JsonObject } from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import get from 'lodash.get';
|
||||
@@ -37,7 +37,7 @@ export async function spotifyApiRequest(
|
||||
try {
|
||||
return await this.helpers.requestOAuth2.call(this, 'spotifyOAuth2Api', options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ export async function spotifyApiRequestAllItems(
|
||||
|
||||
do {
|
||||
responseData = await spotifyApiRequest.call(this, method, endpoint, body, query, uri);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
returnData.push.apply(returnData, get(responseData, propertyName));
|
||||
uri = responseData.next || responseData[propertyName.split('.')[0]].next;
|
||||
//remove the query as the query parameters are already included in the next, else api throws error.
|
||||
|
||||
Reference in New Issue
Block a user