mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(core): Remove linting exceptions in nodes-base, @typescript-eslint/no-unsafe-argument (no-changelog)
This commit is contained in:
@@ -19,7 +19,7 @@ import {
|
||||
uploadAttachments,
|
||||
} from './GenericFunctions';
|
||||
|
||||
import type { ITweet } from './TweetInterface';
|
||||
import type { ITweet, ITweetCreate } from './TweetInterface';
|
||||
|
||||
import ISO6391 from 'iso-639-1';
|
||||
|
||||
@@ -105,7 +105,7 @@ export class Twitter implements INodeType {
|
||||
const userId = this.getNodeParameter('userId', i) as string;
|
||||
const text = this.getNodeParameter('text', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IDataObject = {
|
||||
const body: ITweetCreate = {
|
||||
type: 'message_create',
|
||||
message_create: {
|
||||
target: {
|
||||
@@ -126,14 +126,12 @@ export class Twitter implements INodeType {
|
||||
});
|
||||
|
||||
const medias = await uploadAttachments.call(this, attachmentProperties, items, i);
|
||||
//@ts-ignore
|
||||
body.message_create.message_data.attachment = {
|
||||
type: 'media',
|
||||
//@ts-ignore
|
||||
media: { id: medias[0].media_id_string },
|
||||
};
|
||||
} else {
|
||||
//@ts-ignore
|
||||
delete body.message_create.message_data.attachment;
|
||||
}
|
||||
|
||||
@@ -314,7 +312,7 @@ export class Twitter implements INodeType {
|
||||
}
|
||||
}
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData),
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
|
||||
Reference in New Issue
Block a user