Skip to content

Commit

Permalink
Make the linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxBurner committed Jan 4, 2024
1 parent 2355cb2 commit a046d52
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/components/nodes/vectorstores/Qdrant/Qdrant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class Qdrant_VectorStores implements INode {
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
const qdrantApiKey = getCredentialParam('qdrantApiKey', credentialData, nodeData)

const port = Qdrant_VectorStores.determinePortByUrl(qdrantServerUrl);
const port = Qdrant_VectorStores.determinePortByUrl(qdrantServerUrl)

const client = new QdrantClient({
url: qdrantServerUrl,
Expand Down Expand Up @@ -201,7 +201,7 @@ class Qdrant_VectorStores implements INode {
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
const qdrantApiKey = getCredentialParam('qdrantApiKey', credentialData, nodeData)

const port = Qdrant_VectorStores.determinePortByUrl(qdrantServerUrl);
const port = Qdrant_VectorStores.determinePortByUrl(qdrantServerUrl)

const client = new QdrantClient({
url: qdrantServerUrl,
Expand Down Expand Up @@ -256,20 +256,20 @@ class Qdrant_VectorStores implements INode {
* See: https://stackoverflow.com/questions/59104197/nodejs-new-url-urlhttps-myurl-com80-lists-the-port-as-empty
* @param qdrantServerUrl the url to get the port from
*/
static determinePortByUrl(qdrantServerUrl: string) :number {
const parsedUrl = new URL(qdrantServerUrl);
static determinePortByUrl(qdrantServerUrl: string): number {
const parsedUrl = new URL(qdrantServerUrl)

let port = parsedUrl.port ? parseInt(parsedUrl.port) : 6663

if (parsedUrl.protocol === 'https:' && parsedUrl.port === '') {
port = 443;
port = 443
}
if (parsedUrl.protocol === 'http:' && parsedUrl.port === '') {
port = 80;
port = 80
}


return port;
return port
}
}

Expand Down

0 comments on commit a046d52

Please sign in to comment.