allowing airtable query to send down the number of records you want from your table

This commit is contained in:
Martin McKeaveney 2021-03-10 10:39:58 +00:00
parent 45968b047b
commit 4b5a1d6177
2 changed files with 7 additions and 1 deletions

View File

@ -61,9 +61,11 @@ async function enrichQueryFields(fields, parameters) {
if (typeof fields[key] === "object") {
// enrich nested fields object
enrichedQuery[key] = await enrichQueryFields(fields[key], parameters)
} else {
} else if (typeof fields[key] === "string") {
// enrich string value as normal
enrichedQuery[key] = await processString(fields[key], parameters)
} else {
enrichedQuery[key] = fields[key]
}
}

View File

@ -40,6 +40,10 @@ const SCHEMA = {
type: FIELD_TYPES.STRING,
required: true,
},
numRecords: {
type: FIELD_TYPES.NUMBER,
default: 10,
},
},
},
update: {