Refactored In The Crack. Added chapter videos (unused) and dates. Added stylized entity name field.

This commit is contained in:
DebaucheryLibrarian
2026-02-07 05:53:16 +01:00
parent 33179c0829
commit 9a8527a780
6 changed files with 249 additions and 211 deletions

View File

@@ -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,
};
}, {});