mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-23 15:18:16 +02:00
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:
1 file changed
+4
-5
@@ -86,11 +86,10 @@ router.get('/', async (req, res) => {
|
|||||||
note.files_count = files?.length || 0;
|
note.files_count = files?.length || 0;
|
||||||
|
|
||||||
const tags = await getAll(`
|
const tags = await getAll(`
|
||||||
SELECT t.id, t.name
|
SELECT id, tag as name
|
||||||
FROM tags t
|
FROM note_tags
|
||||||
INNER JOIN note_tags nt ON t.id = nt.tag_id
|
WHERE note_id = ?
|
||||||
WHERE nt.note_id = ?
|
ORDER BY tag ASC
|
||||||
ORDER BY t.name ASC
|
|
||||||
`, [note.id]);
|
`, [note.id]);
|
||||||
note.tags = tags || [];
|
note.tags = tags || [];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user