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:
@@ -7,7 +7,7 @@ import type {
|
||||
ILoadOptionsFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import type { IDataObject } from 'n8n-workflow';
|
||||
import type { IDataObject, JsonObject } from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
export async function profitWellApiRequest(
|
||||
@@ -37,13 +37,13 @@ export async function profitWellApiRequest(
|
||||
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
export function simplifyDailyMetrics(responseData: {
|
||||
export type Metrics = {
|
||||
[key: string]: [{ date: string; value: number | null }];
|
||||
}) {
|
||||
};
|
||||
export function simplifyDailyMetrics(responseData: Metrics) {
|
||||
const data: IDataObject[] = [];
|
||||
const keys = Object.keys(responseData);
|
||||
const dates = responseData[keys[0]].map((e) => e.date);
|
||||
@@ -59,9 +59,7 @@ export function simplifyDailyMetrics(responseData: {
|
||||
return data;
|
||||
}
|
||||
|
||||
export function simplifyMontlyMetrics(responseData: {
|
||||
[key: string]: [{ date: string; value: number | null }];
|
||||
}) {
|
||||
export function simplifyMontlyMetrics(responseData: Metrics) {
|
||||
const data: IDataObject = {};
|
||||
for (const key of Object.keys(responseData)) {
|
||||
for (const [index] of responseData[key].entries()) {
|
||||
|
||||
Reference in New Issue
Block a user