connecting to cloud database

This commit is contained in:
SPRINX0\prochazka
2025-05-22 09:46:07 +02:00
parent 590a4ae476
commit 07073eebe9
8 changed files with 103 additions and 12 deletions

View File

@@ -423,6 +423,16 @@ module.exports = {
return volatile;
}
const cloudMatch = conid.match(/^cloud\:\/\/(.+)\/(.+)$/);
if (cloudMatch) {
const cloud = require('./cloud');
const { content } = await cloud.getContent({ folid: cloudMatch[1], cntid: cloudMatch[2] });
return {
...JSON.parse(content),
_id: conid,
};
}
const storage = require('./storage');
const storageConnection = await storage.getConnection({ conid });