mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
fix: fix credentials and parsing of numbers
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
import { INodeParams, INodeCredential } from '../src/Interface'
|
import { INodeParams, INodeCredential } from '../src/Interface'
|
||||||
|
|
||||||
class ApifyApi implements INodeCredential {
|
class ApifyApiCredential implements INodeCredential {
|
||||||
label: string
|
label: string
|
||||||
name: string
|
name: string
|
||||||
version: number
|
version: number
|
||||||
@@ -23,4 +23,4 @@ class ApifyApi implements INodeCredential {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { credClass: ApifyApi }
|
module.exports = { credClass: ApifyApiCredential }
|
||||||
+4
-4
@@ -103,8 +103,8 @@ class ApifyWebsiteContentCrawler_DocumentLoaders implements INode {
|
|||||||
// Get input options and merge with additional input
|
// Get input options and merge with additional input
|
||||||
const urls = nodeData.inputs?.urls as string
|
const urls = nodeData.inputs?.urls as string
|
||||||
const crawlerType = nodeData.inputs?.crawlerType as string
|
const crawlerType = nodeData.inputs?.crawlerType as string
|
||||||
const maxCrawlDepth = nodeData.inputs?.maxCrawlDepth as number
|
const maxCrawlDepth = nodeData.inputs?.maxCrawlDepth as string
|
||||||
const maxCrawlPages = nodeData.inputs?.maxCrawlPages as number
|
const maxCrawlPages = nodeData.inputs?.maxCrawlPages as string
|
||||||
const additionalInput =
|
const additionalInput =
|
||||||
typeof nodeData.inputs?.additionalInput === 'object'
|
typeof nodeData.inputs?.additionalInput === 'object'
|
||||||
? nodeData.inputs?.additionalInput
|
? nodeData.inputs?.additionalInput
|
||||||
@@ -112,8 +112,8 @@ class ApifyWebsiteContentCrawler_DocumentLoaders implements INode {
|
|||||||
const input = {
|
const input = {
|
||||||
startUrls: urls.split(',').map((url) => ({ url: url.trim() })),
|
startUrls: urls.split(',').map((url) => ({ url: url.trim() })),
|
||||||
crawlerType,
|
crawlerType,
|
||||||
maxCrawlDepth,
|
maxCrawlDepth: parseInt(maxCrawlDepth, 10),
|
||||||
maxCrawlPages,
|
maxCrawlPages: parseInt(maxCrawlPages, 10),
|
||||||
...additionalInput
|
...additionalInput
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user