Merge pull request #60 from R0m1k3/claude/integrate-google-calendar-api-011CV44Nie9HB7U35ArSUnNa

Fix: Correction requête SQL pour les tags dans les notes
This commit is contained in:
LogiFlow authored and GitHub committed 2025-11-12 22:50:40 +01:00
commit 4c3ba7b733
1 file changed
+4 -5
+4 -5
View File
@@ -86,11 +86,10 @@ router.get('/', async (req, res) => {
note.files_count = files?.length || 0;
const tags = await getAll(`
SELECT t.id, t.name
FROM tags t
INNER JOIN note_tags nt ON t.id = nt.tag_id
WHERE nt.note_id = ?
ORDER BY t.name ASC
SELECT id, tag as name
FROM note_tags
WHERE note_id = ?
ORDER BY tag ASC
`, [note.id]);
note.tags = tags || [];
}