Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Airtable: fix outports for ListRecords #214

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/appmixer/airtable/bundle.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "appmixer.airtable",
"version": "2.0.0",
"version": "2.0.1",
"changelog": {
"1.0.4": [
"Initial release"
],
"1.0.5": [
"Renamed output varible name in ListBases from Array to Bases and in ListTables from Array to Tables."
],
"2.0.0": [
"2.0.1": [
"(breaking change) Fixed output schema for ListTables and ListBases."
]
}
Expand Down
12 changes: 6 additions & 6 deletions src/appmixer/airtable/records/ListRecords/ListRecords.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,23 @@ module.exports = {

getOutputPortOptions(context, outputType) {

if (outputType === 'item') {
if (outputType === 'object') {
return context.sendJson(
[
{ label: 'createdTime', value: 'createdTime' },
{ label: 'fields', value: 'fields',
{ label: 'Created Time', value: 'createdTime' },
{ label: 'Fields', value: 'fields',
// We can't know table columns beforehand, so we'll just use empty object as schema.
schema: { type: 'object' }
},
{ label: 'id', value: 'id' },
{ label: 'commentCount', value: 'commentCount' }
{ label: 'ID', value: 'id' },
{ label: 'Comment Count', value: 'commentCount' }
],
'out'
);
} else if (outputType === 'array') {
return context.sendJson(
[
{ label: 'Result', value: 'result',
{ label: 'Records', value: 'result',
schema: { type: 'array',
items: { type: 'object',
properties: {
Expand Down
Loading