mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix recommendation wildcard search
This commit is contained in:
parent
bf2c54084b
commit
5f6587537e
1 changed files with 5 additions and 1 deletions
|
|
@ -249,12 +249,16 @@ const buildWhereClause = (
|
|||
.innerJoin('library_item.recommendations', 'recommendations')
|
||||
.innerJoin('recommendations.recommender', 'recommender')
|
||||
.innerJoin('recommendations.group', 'group')
|
||||
.andWhere(
|
||||
|
||||
// select all if * is provided
|
||||
if (args.recommendedBy !== '*') {
|
||||
queryBuilder.andWhere(
|
||||
'(lower(recommender.name) = :recommendedBy OR lower(group.name) = :recommendedBy)',
|
||||
{
|
||||
recommendedBy: args.recommendedBy.toLowerCase(),
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue