From 2da4328c93992251b7b25f67ade2ace3c1ade236 Mon Sep 17 00:00:00 2001 From: Predrag Stojadinovic Date: Fri, 17 May 2024 13:33:09 +0200 Subject: [PATCH] chore: fixing the human readable confluence url fetch baseUrl --- collector/utils/extensions/Confluence/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/collector/utils/extensions/Confluence/index.js b/collector/utils/extensions/Confluence/index.js index c61e0b3e..0dc845dc 100644 --- a/collector/utils/extensions/Confluence/index.js +++ b/collector/utils/extensions/Confluence/index.js @@ -102,14 +102,13 @@ async function loadConfluence({ pageUrl, username, accessToken }) { const outFolderPath = process.env.NODE_ENV === "development" ? path.resolve( - __dirname, - `../../../../server/storage/documents/${outFolder}` - ) + __dirname, + `../../../../server/storage/documents/${outFolder}` + ) : path.resolve(process.env.STORAGE_DIR, `documents/${outFolder}`); - if (!fs.existsSync(outFolderPath)) { + if (!fs.existsSync(outFolderPath)) fs.mkdirSync(outFolderPath, { recursive: true }); - } docs.forEach((doc) => { if (!doc.pageContent) return;