Dateien nach "backend/src/tools/dateien" hochladen

This commit is contained in:
2026-05-27 09:10:52 +02:00
parent e08d09213b
commit 5fb2fa4189

View File

@@ -92,7 +92,9 @@ router.get('/folders', authenticate, (req, res) => {
}; };
// Folders shared BY me // Folders shared BY me
const sharedByMeFolders = parentId ? [] : db.prepare(` const sharedByMeFolders = parentId ? [] : db.prepare(`
SELECT DISTINCT f.*, u.username as owner, GROUP_CONCAT(su.username) as shared_with_names SELECT DISTINCT f.*, u.username as owner,
GROUP_CONCAT(su.username) as shared_with_names,
MIN(fs.created_at) as shared_at
FROM folders f JOIN users u ON u.id=f.user_id FROM folders f JOIN users u ON u.id=f.user_id
JOIN folder_shares fs ON fs.folder_id=f.id JOIN folder_shares fs ON fs.folder_id=f.id
JOIN users su ON su.id=fs.shared_with JOIN users su ON su.id=fs.shared_with
@@ -165,7 +167,9 @@ router.get('/', authenticate, (req, res) => {
// Files shared BY me // Files shared BY me
const sharedByMe = folderId ? [] : db.prepare(` const sharedByMe = folderId ? [] : db.prepare(`
SELECT DISTINCT f.*, u.username as owner, GROUP_CONCAT(su.username) as shared_with_names SELECT DISTINCT f.*, u.username as owner,
GROUP_CONCAT(su.username) as shared_with_names,
MIN(s.created_at) as shared_at
FROM files f JOIN users u ON u.id=f.user_id FROM files f JOIN users u ON u.id=f.user_id
JOIN file_shares s ON s.file_id=f.id JOIN file_shares s ON s.file_id=f.id
JOIN users su ON su.id=s.shared_with JOIN users su ON su.id=s.shared_with