mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
Fixing linting issues using 'yarn lint-fix'
This commit is contained in:
@@ -55,24 +55,23 @@ class Airtable_DocumentLoaders implements INode {
|
|||||||
description:
|
description:
|
||||||
'If your table URL looks like: https://airtable.com/app11RobdGoX0YNsC/tblJdmvbrgizbYICO/viw9UrP77Id0CE4ee, tblJdmvbrgizbYICO is the table id'
|
'If your table URL looks like: https://airtable.com/app11RobdGoX0YNsC/tblJdmvbrgizbYICO/viw9UrP77Id0CE4ee, tblJdmvbrgizbYICO is the table id'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'View Id',
|
label: 'View Id',
|
||||||
name: 'viewId',
|
name: 'viewId',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
placeholder: 'viw9UrP77Id0CE4ee',
|
placeholder: 'viw9UrP77Id0CE4ee',
|
||||||
description:
|
description:
|
||||||
'If your view URL looks like: https://airtable.com/app11RobdGoX0YNsC/tblJdmvbrgizbYICO/viw9UrP77Id0CE4ee, viw9UrP77Id0CE4ee is the view id',
|
'If your view URL looks like: https://airtable.com/app11RobdGoX0YNsC/tblJdmvbrgizbYICO/viw9UrP77Id0CE4ee, viw9UrP77Id0CE4ee is the view id',
|
||||||
optional: true
|
optional: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Exclude Field Names',
|
label: 'Exclude Field Names',
|
||||||
name: 'excludeFieldNames',
|
name: 'excludeFieldNames',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
placeholder: 'Name, Assignee',
|
placeholder: 'Name, Assignee',
|
||||||
optional: true,
|
optional: true,
|
||||||
additionalParams: true,
|
additionalParams: true,
|
||||||
description:
|
description: 'Comma-separated list of field names to exclude'
|
||||||
'Comma-separated list of field names to exclude'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Return All',
|
label: 'Return All',
|
||||||
@@ -116,7 +115,7 @@ class Airtable_DocumentLoaders implements INode {
|
|||||||
baseId,
|
baseId,
|
||||||
tableId,
|
tableId,
|
||||||
viewId,
|
viewId,
|
||||||
excludeFieldNames: excludeFieldNames ? excludeFieldNames.split(',').map(id => id.trim()) : [],
|
excludeFieldNames: excludeFieldNames ? excludeFieldNames.split(',').map((id) => id.trim()) : [],
|
||||||
returnAll,
|
returnAll,
|
||||||
accessToken,
|
accessToken,
|
||||||
limit: limit ? parseInt(limit, 10) : 100
|
limit: limit ? parseInt(limit, 10) : 100
|
||||||
@@ -223,12 +222,12 @@ class AirtableLoader extends BaseDocumentLoader {
|
|||||||
private createDocumentFromPage(page: AirtableLoaderPage): Document {
|
private createDocumentFromPage(page: AirtableLoaderPage): Document {
|
||||||
// Generate the URL
|
// Generate the URL
|
||||||
const pageUrl = `https://api.airtable.com/v0/${this.baseId}/${this.tableId}/${page.id}`
|
const pageUrl = `https://api.airtable.com/v0/${this.baseId}/${this.tableId}/${page.id}`
|
||||||
const fields = { ...page.fields };
|
const fields = { ...page.fields }
|
||||||
|
|
||||||
// Exclude any specified fields
|
// Exclude any specified fields
|
||||||
this.excludeFieldNames.forEach(id => {
|
this.excludeFieldNames.forEach((id) => {
|
||||||
delete fields[id];
|
delete fields[id]
|
||||||
});
|
})
|
||||||
|
|
||||||
// Return a langchain document
|
// Return a langchain document
|
||||||
return new Document({
|
return new Document({
|
||||||
|
|||||||
Reference in New Issue
Block a user