Add ability to search on domain and username too
This commit is contained in:
parent
586f7c1bef
commit
3e0c9ff5d5
1 changed files with 17 additions and 3 deletions
|
@ -676,9 +676,23 @@ export class VideoModel extends Model<VideoModel> {
|
||||||
limit: count,
|
limit: count,
|
||||||
order: getSort(sort),
|
order: getSort(sort),
|
||||||
where: {
|
where: {
|
||||||
|
[Sequelize.Op.or]: [
|
||||||
|
{
|
||||||
name: {
|
name: {
|
||||||
[ Sequelize.Op.iLike ]: '%' + value + '%'
|
[ Sequelize.Op.iLike ]: '%' + value + '%'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
preferredUsername: Sequelize.where(Sequelize.col('preferredUsername'), {
|
||||||
|
[ Sequelize.Op.iLike ]: '%' + value + '%'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
host: Sequelize.where(Sequelize.col('host'), {
|
||||||
|
[ Sequelize.Op.iLike ]: '%' + value + '%'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue