fix: join tags by the proper key

This commit is contained in:
Zephyrrus 2020-07-20 21:43:23 +03:00
parent 6fee07d9e1
commit c5b165b495
1 changed files with 1 additions and 1 deletions

View File

@ -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({