forked from DebaucheryLibrarian/traxxx
Improved release detail bar behavior.
This commit is contained in:
@@ -51,7 +51,7 @@ async function attachChannelEntities(releases) {
|
||||
const channelEntities = await knex('entities')
|
||||
.select(knex.raw('entities.*, row_to_json(parents) as parent'))
|
||||
.whereIn('entities.slug', releasesWithoutEntity.map(release => release.channel))
|
||||
.where('entities.type', 2)
|
||||
.where('entities.type', 'channel')
|
||||
.leftJoin('entities AS parents', 'parents.id', 'entities.parent_id');
|
||||
|
||||
const channelEntitiesBySlug = channelEntities.reduce((acc, entity) => ({ ...acc, [entity.slug]: entity }), {});
|
||||
@@ -84,7 +84,7 @@ async function attachStudios(releases) {
|
||||
|
||||
const studios = await knex('entities')
|
||||
.whereIn('slug', studioSlugs)
|
||||
.where('type', 3);
|
||||
.where('type', 'studio');
|
||||
|
||||
const studioBySlug = studios.reduce((acc, studio) => ({ ...acc, [studio.slug]: studio }), {});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user