aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes/files
diff options
context:
space:
mode:
authorZephyrrus <[email protected]>2020-07-20 21:43:23 +0300
committerZephyrrus <[email protected]>2020-07-20 21:43:23 +0300
commitc5b165b4953e910d6af71636604c1cdef7467a76 (patch)
tree2ba56235e7b6109a55a3312549ec2abcc18473e1 /src/api/routes/files
parentfix: don't crash the server if a route fails to load (diff)
downloadhost.fuwn.me-c5b165b4953e910d6af71636604c1cdef7467a76.tar.xz
host.fuwn.me-c5b165b4953e910d6af71636604c1cdef7467a76.zip
fix: join tags by the proper key
Diffstat (limited to 'src/api/routes/files')
-rw-r--r--src/api/routes/files/fileGET.js2
1 files changed, 1 insertions, 1 deletions
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({