fix(core): Remove linting exceptions in nodes-base, @typescript-eslint/no-unsafe-argument (no-changelog)

This commit is contained in:
Michael Kret
2023-02-28 05:39:43 +02:00
committed by GitHub
parent 3172ea376e
commit bb4db58819
560 changed files with 2227 additions and 1919 deletions

View File

@@ -52,7 +52,7 @@ export async function mauticApiRequest(
if (returnData.errors) {
// They seem to to sometimes return 200 status but still error.
throw new NodeApiError(this.getNode(), returnData);
throw new NodeApiError(this.getNode(), returnData as JsonObject);
}
return returnData;
@@ -82,13 +82,13 @@ export async function mauticApiRequestAllItems(
do {
responseData = await mauticApiRequest.call(this, method, endpoint, body, query);
const values = Object.values(responseData[propertyName]);
const values = Object.values(responseData[propertyName] as IDataObject[]);
//@ts-ignore
returnData.push.apply(returnData, values);
query.start += query.limit;
} while (
responseData.total !== undefined &&
returnData.length - parseInt(responseData.total, 10) < 0
returnData.length - parseInt(responseData.total as string, 10) < 0
);
return returnData;