Showing movie trailers. Added internal parameter for entity visibility.

This commit is contained in:
2024-08-16 23:24:11 +02:00
parent cd6318216f
commit 50570cb734
5 changed files with 40 additions and 21 deletions

View File

@@ -67,6 +67,10 @@ export async function fetchEntities(options) {
if (options.type) {
builder.where('entities.type', options.type);
}
if (options.showInvisible !== true) {
builder.where('entities.visible', true);
}
})
.leftJoin('entities as parents', 'parents.id', 'entities.parent_id')
.orderBy(...(options.order || ['name', 'asc']))