From c5b165b4953e910d6af71636604c1cdef7467a76 Mon Sep 17 00:00:00 2001 From: Zephyrrus Date: Mon, 20 Jul 2020 21:43:23 +0300 Subject: fix: join tags by the proper key --- src/api/routes/files/fileGET.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/api/routes') diff --git a/src/api/routes/files/fileGET.js b/src/api/routes/files/fileGET.js index e9ce90e..0a6f2de 100644 --- a/src/api/routes/files/fileGET.js +++ b/src/api/routes/files/fileGET.js @@ -31,7 +31,7 @@ class fileGET extends Route { */ const tags = await db.table('fileTags') .where('fileId', id) - .join('tags', 'tags.id', 'fileTags.id') + .join('tags', 'tags.id', 'fileTags.tagId') .select('tags.id', 'tags.uuid', 'tags.name'); return res.json({ -- cgit v1.2.3