forked from DebaucheryLibrarian/traxxx
Refactored In The Crack. Added chapter videos (unused) and dates. Added stylized entity name field.
This commit is contained in:
@@ -219,7 +219,7 @@ async function fetchIncludedEntities() {
|
||||
return curatedNetworks;
|
||||
}
|
||||
|
||||
async function fetchEntitiesBySlug(entitySlugs, options = { prefer: 'channel' }) {
|
||||
async function fetchEntitiesBySlug(entitySlugs, options = { prefer: 'channel', appendBySlug: true }) {
|
||||
const entities = await knex.raw(`
|
||||
WITH RECURSIVE entity_tree as (
|
||||
SELECT to_jsonb(entities) as entity,
|
||||
@@ -267,7 +267,7 @@ async function fetchEntitiesBySlug(entitySlugs, options = { prefer: 'channel' })
|
||||
|
||||
return {
|
||||
...accEntities,
|
||||
[entity.slug]: curatedEntity,
|
||||
...(options.appendBySlug !== false ? { [entity.slug]: curatedEntity } : null),
|
||||
[host]: curatedEntity,
|
||||
};
|
||||
}, {});
|
||||
|
||||
Reference in New Issue
Block a user