mirror of https://github.com/Chocobozzz/PeerTube
Add ability to search on domain and username too
parent
586f7c1bef
commit
3e0c9ff5d5
|
@ -676,9 +676,23 @@ export class VideoModel extends Model<VideoModel> {
|
|||
limit: count,
|
||||
order: getSort(sort),
|
||||
where: {
|
||||
[Sequelize.Op.or]: [
|
||||
{
|
||||
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 New Issue