chore: fixing the human readable confluence url fetch baseUrl

This commit is contained in:
Predrag Stojadinovic 2024-05-17 13:33:09 +02:00
parent 0fb5fa29ad
commit 2da4328c93

View File

@ -102,14 +102,13 @@ async function loadConfluence({ pageUrl, username, accessToken }) {
const outFolderPath = const outFolderPath =
process.env.NODE_ENV === "development" process.env.NODE_ENV === "development"
? path.resolve( ? path.resolve(
__dirname, __dirname,
`../../../../server/storage/documents/${outFolder}` `../../../../server/storage/documents/${outFolder}`
) )
: path.resolve(process.env.STORAGE_DIR, `documents/${outFolder}`); : path.resolve(process.env.STORAGE_DIR, `documents/${outFolder}`);
if (!fs.existsSync(outFolderPath)) { if (!fs.existsSync(outFolderPath))
fs.mkdirSync(outFolderPath, { recursive: true }); fs.mkdirSync(outFolderPath, { recursive: true });
}
docs.forEach((doc) => { docs.forEach((doc) => {
if (!doc.pageContent) return; if (!doc.pageContent) return;