Storing and fetching tags.
This commit is contained in:
@@ -8,6 +8,11 @@ async function curateRelease(release) {
|
||||
.where({ release_id: release.id })
|
||||
.leftJoin('actors', 'actors.id', 'actors_associated.actor_id');
|
||||
|
||||
const tags = await knex('tags_associated')
|
||||
.select('tags.tag', 'tags.capitalization')
|
||||
.where({ release_id: release.id })
|
||||
.leftJoin('tags', 'tags.tag', 'tags_associated.tag_id');
|
||||
|
||||
return {
|
||||
id: release.id,
|
||||
title: release.title,
|
||||
@@ -18,6 +23,7 @@ async function curateRelease(release) {
|
||||
entryId: release.entry_id,
|
||||
actors,
|
||||
director: release.director,
|
||||
tags,
|
||||
rating: {
|
||||
likes: release.likes,
|
||||
dislikes: release.dislikes,
|
||||
|
||||
Reference in New Issue
Block a user