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:
@@ -8,7 +8,7 @@ import type {
|
||||
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 sentryIoApiRequest(
|
||||
@@ -38,7 +38,7 @@ export async function sentryIoApiRequest(
|
||||
uri: uri || `https://sentry.io${resource}`,
|
||||
json: true,
|
||||
};
|
||||
if (!Object.keys(body).length) {
|
||||
if (!Object.keys(body as IDataObject).length) {
|
||||
delete options.body;
|
||||
}
|
||||
|
||||
@@ -70,13 +70,12 @@ export async function sentryIoApiRequest(
|
||||
Authorization: `Bearer ${credentials?.token}`,
|
||||
};
|
||||
|
||||
//@ts-ignore
|
||||
return await this.helpers.request(options);
|
||||
} else {
|
||||
return await this.helpers.requestOAuth2.call(this, 'sentryIoOAuth2Api', options);
|
||||
}
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,12 +120,12 @@ export async function sentryApiRequestAllItems(
|
||||
resolveWithFullResponse: true,
|
||||
});
|
||||
link = responseData.headers.link;
|
||||
uri = getNext(link);
|
||||
returnData.push.apply(returnData, responseData.body);
|
||||
uri = getNext(link as string);
|
||||
returnData.push.apply(returnData, responseData.body as IDataObject[]);
|
||||
if (query.limit && query.limit >= returnData.length) {
|
||||
return;
|
||||
}
|
||||
} while (hasMore(link));
|
||||
} while (hasMore(link as string));
|
||||
|
||||
return returnData;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user