Fixed stash heart not highlighted in search results.

This commit is contained in:
2024-05-01 03:57:12 +02:00
parent ef2c832605
commit dd111a6c3b
5 changed files with 64 additions and 4 deletions

View File

@@ -26,6 +26,14 @@ export function curateEntity(entity, context) {
export async function fetchEntities(options) {
const entities = await knex('entities')
.modify((builder) => {
if (options.query) {
builder.where((whereBuilder) => {
whereBuilder
.whereLike('name', options.query)
.orWhereLike('slug', options.query);
});
}
if (options.type === 'primary') {
builder
.where('type', 'network')