@@ -4,7 +4,6 @@ import type {
44 INodeType ,
55 INodeTypeDescription ,
66} from 'n8n-workflow' ;
7- import { NodeConnectionType , NodeOperationError } from 'n8n-workflow' ;
87import {
98 availableAdminOperations ,
109 availableOtherOperations ,
@@ -113,8 +112,8 @@ export class LinkedApi implements INodeType {
113112 defaults : {
114113 name : 'Linked API' ,
115114 } ,
116- inputs : [ NodeConnectionType . Main ] ,
117- outputs : [ NodeConnectionType . Main ] ,
115+ inputs : [ 'main' ] ,
116+ outputs : [ 'main' ] ,
118117 usableAsTool : true ,
119118 hints : [
120119 {
@@ -188,18 +187,13 @@ export class LinkedApi implements INodeType {
188187
189188 async execute ( this : IExecuteFunctions ) : Promise < INodeExecutionData [ ] [ ] > {
190189 const operation = this . getNodeParameter ( 'operation' , 0 ) as string ;
191- const credentials = await this . getCredentials ( 'linkedApi' ) ;
192-
193- if ( credentials === undefined ) {
194- throw new NodeOperationError ( this . getNode ( ) , 'No credentials got returned!' ) ;
195- }
196190
197191 const items = this . getInputData ( ) ;
198192 const returnData : INodeExecutionData [ ] = [ ] ;
199193
200194 for ( let i = 0 ; i < items . length ; i ++ ) {
201195 try {
202- const responseData = await operations [ operation ] . execute ( this ) ;
196+ const responseData = await operations [ operation ] . execute ( this , i ) ;
203197 if ( Array . isArray ( responseData ) ) {
204198 for ( const entry of responseData ) {
205199 returnData . push ( { json : entry , pairedItem : { item : i } } ) ;
0 commit comments