fix: fix credentials and parsing of numbers

pull/399/head
drobnikj 2023-08-09 09:49:39 +02:00
parent e09bad0440
commit 83d8e96f9c
2 changed files with 6 additions and 6 deletions

View File

@ -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 }

View File

@ -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
}