From a5065411ccc1a86a560a5579b00a55581b95871b Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 9 Aug 2022 14:55:45 +0100 Subject: [PATCH] Add table field to Airtable update --- packages/server/src/integrations/airtable.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/server/src/integrations/airtable.ts b/packages/server/src/integrations/airtable.ts index ec49bf5e40..4274cff5db 100644 --- a/packages/server/src/integrations/airtable.ts +++ b/packages/server/src/integrations/airtable.ts @@ -63,7 +63,11 @@ module AirtableModule { type: QueryTypes.FIELDS, customisable: true, fields: { - id: { + recordId: { + type: DatasourceFieldTypes.STRING, + required: true, + }, + table: { type: DatasourceFieldTypes.STRING, required: true, }, @@ -112,13 +116,13 @@ module AirtableModule { } } - async update(query: { table: any; id: any; json: any }) { - const { table, id, json } = query + async update(query: { table: any; recordId: any; json: any }) { + const { table, recordId, json } = query try { return await this.client(table).update([ { - id, + id: recordId, fields: json, }, ])