mirror of https://github.com/FlowiseAI/Flowise.git
fix: fix credentials and parsing of numbers
parent
e09bad0440
commit
83d8e96f9c
|
|
@ -1,6 +1,6 @@
|
|||
import { INodeParams, INodeCredential } from '../src/Interface'
|
||||
|
||||
class ApifyApi implements INodeCredential {
|
||||
class ApifyApiCredential implements INodeCredential {
|
||||
label: string
|
||||
name: string
|
||||
version: number
|
||||
|
|
@ -23,4 +23,4 @@ class ApifyApi implements INodeCredential {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = { credClass: ApifyApi }
|
||||
module.exports = { credClass: ApifyApiCredential }
|
||||
|
|
@ -103,8 +103,8 @@ class ApifyWebsiteContentCrawler_DocumentLoaders implements INode {
|
|||
// Get input options and merge with additional input
|
||||
const urls = nodeData.inputs?.urls as string
|
||||
const crawlerType = nodeData.inputs?.crawlerType as string
|
||||
const maxCrawlDepth = nodeData.inputs?.maxCrawlDepth as number
|
||||
const maxCrawlPages = nodeData.inputs?.maxCrawlPages as number
|
||||
const maxCrawlDepth = nodeData.inputs?.maxCrawlDepth as string
|
||||
const maxCrawlPages = nodeData.inputs?.maxCrawlPages as string
|
||||
const additionalInput =
|
||||
typeof nodeData.inputs?.additionalInput === 'object'
|
||||
? nodeData.inputs?.additionalInput
|
||||
|
|
@ -112,8 +112,8 @@ class ApifyWebsiteContentCrawler_DocumentLoaders implements INode {
|
|||
const input = {
|
||||
startUrls: urls.split(',').map((url) => ({ url: url.trim() })),
|
||||
crawlerType,
|
||||
maxCrawlDepth,
|
||||
maxCrawlPages,
|
||||
maxCrawlDepth: parseInt(maxCrawlDepth, 10),
|
||||
maxCrawlPages: parseInt(maxCrawlPages, 10),
|
||||
...additionalInput
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue