Dateien nach "backend/src/routes" hochladen

This commit is contained in:
2026-05-26 15:51:38 +02:00
parent 37ccdfbdda
commit 77e16b51c2
2 changed files with 22 additions and 2 deletions

View File

@@ -39,8 +39,7 @@ router.get('/users', authenticate, requireAdmin, (req, res) => {
const links = db.prepare('SELECT COUNT(*) c FROM quick_links WHERE user_id=?').get(u.id).c;
const files = db.prepare('SELECT COUNT(*) c FROM files WHERE user_id=?').get(u.id).c;
const noteLen = (db.prepare('SELECT content FROM notes WHERE user_id=?').get(u.id)?.content || '').length;
// iCals are stored in localStorage per user - not in DB, so we can't count them server-side
const icals = 0;
const icals = db.prepare('SELECT COUNT(*) c FROM calendar_feeds WHERE user_id=?').get(u.id).c;
return { ...u, archiv, bestellung, todos, links, files, icals, noteLen };
});
res.json(stats);