mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-12 01:39:47 +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;
|
||||
|
||||
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 || [];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user