Generalized filters bar, added to network page.
This commit is contained in:
@@ -77,6 +77,8 @@ function commonQuery(queryBuilder, {
|
||||
before = new Date(2 ** 44), // May 2109
|
||||
limit = 100,
|
||||
}) {
|
||||
const finalFilter = [].concat(filter); // ensure filter is array
|
||||
|
||||
queryBuilder
|
||||
.leftJoin('sites', 'releases.site_id', 'sites.id')
|
||||
.leftJoin('studios', 'releases.studio_id', 'studios.id')
|
||||
@@ -93,7 +95,7 @@ function commonQuery(queryBuilder, {
|
||||
.select('*')
|
||||
.from('tags_associated')
|
||||
.leftJoin('tags', 'tags_associated.tag_id', 'tags.id')
|
||||
.whereIn('tags.slug', filter)
|
||||
.whereIn('tags.slug', finalFilter)
|
||||
.andWhereRaw('tags_associated.release_id = releases.id');
|
||||
})
|
||||
.andWhere('date', '>', after)
|
||||
|
||||
Reference in New Issue
Block a user