Code-Schnipsel: Diff-History, Beschreibung sichtbar, Multi-Tag-Filter, Geteilt-von-mir Tab, nur genutzte Tags
This commit is contained in:
@@ -27,7 +27,16 @@ router.get('/', authenticate, (req, res) => {
|
||||
ORDER BY s.updated_at DESC
|
||||
`).all(me).map(enrich);
|
||||
|
||||
res.json({ own, shared });
|
||||
const sharedByMe = db.prepare(`
|
||||
SELECT s.*, u.username as shared_with_name
|
||||
FROM snippets s
|
||||
JOIN snippet_shares sh ON sh.snippet_id=s.id
|
||||
JOIN users u ON u.id=sh.shared_with
|
||||
WHERE s.user_id=?
|
||||
ORDER BY s.title ASC
|
||||
`).all(me).map(enrich);
|
||||
|
||||
res.json({ own, shared, sharedByMe });
|
||||
});
|
||||
|
||||
// ── Einzelnes Snippet ────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user