Add ability to search on domain and username too
This commit is contained in:
parent
586f7c1bef
commit
3e0c9ff5d5
|
@ -676,9 +676,23 @@ export class VideoModel extends Model<VideoModel> {
|
|||
limit: count,
|
||||
order: getSort(sort),
|
||||
where: {
|
||||
name: {
|
||||
[Sequelize.Op.iLike]: '%' + value + '%'
|
||||
}
|
||||
[Sequelize.Op.or]: [
|
||||
{
|
||||
name: {
|
||||
[ 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 New Issue