From 87f2e8b91c5d300c047f9020897e1bd06958985a Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Mon, 10 Feb 2020 17:39:44 -0800 Subject: [PATCH] :zap: Remove "loadOptionsMethod" for Airtable application selection --- .../nodes/Airtable/Airtable.node.ts | 38 ++----------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/packages/nodes-base/nodes/Airtable/Airtable.node.ts b/packages/nodes-base/nodes/Airtable/Airtable.node.ts index c4269df78..1217d63fe 100644 --- a/packages/nodes-base/nodes/Airtable/Airtable.node.ts +++ b/packages/nodes-base/nodes/Airtable/Airtable.node.ts @@ -75,16 +75,12 @@ export class Airtable implements INodeType { // All // ---------------------------------- { - displayName: 'Application', + displayName: 'Application ID', name: 'application', - type: 'options', - typeOptions: { - loadOptionsMethod: 'getApplications', - }, - options: [], + type: 'string', default: '', required: true, - description: 'The application to access', + description: 'The ID of the application to access.', }, { displayName: 'Table', @@ -93,7 +89,7 @@ export class Airtable implements INodeType { default: '', placeholder: 'Stories', required: true, - description: 'The name of table to access', + description: 'The name of table to access.', }, // ---------------------------------- @@ -363,32 +359,6 @@ export class Airtable implements INodeType { ], }; - methods = { - loadOptions: { - // Get all the available applications to display them to user so that he can - // select them easily - async getApplications(this: ILoadOptionsFunctions): Promise { - const endpoint = 'meta'; - const responseData = await apiRequest.call(this, 'GET', endpoint, {}); - - if (responseData.applications === undefined) { - throw new Error('No data got returned'); - } - - const returnData: INodePropertyOptions[] = []; - for (const baseData of responseData.applications) { - returnData.push({ - name: baseData.name, - value: baseData.id, - }); - } - - return returnData; - }, - }, - }; - - async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); const returnData: IDataObject[] = [];