Fix bug
This commit is contained in:
parent
a231f8d26c
commit
6c9d80d4e8
|
@ -69,8 +69,8 @@ export default define(meta, async (ps, me) => {
|
||||||
if (isUsername) {
|
if (isUsername) {
|
||||||
users = await Users.createQueryBuilder('user')
|
users = await Users.createQueryBuilder('user')
|
||||||
.where('user.host IS NULL')
|
.where('user.host IS NULL')
|
||||||
.where('user.isSuspended = FALSE')
|
.andWhere('user.isSuspended = FALSE')
|
||||||
.where('user.usernameLower like :username', { username: ps.query.replace('@', '').toLowerCase() + '%' })
|
.andWhere('user.usernameLower like :username', { username: ps.query.replace('@', '').toLowerCase() + '%' })
|
||||||
.take(ps.limit)
|
.take(ps.limit)
|
||||||
.skip(ps.offset)
|
.skip(ps.offset)
|
||||||
.getMany();
|
.getMany();
|
||||||
|
@ -78,8 +78,8 @@ export default define(meta, async (ps, me) => {
|
||||||
if (users.length < ps.limit && !ps.localOnly) {
|
if (users.length < ps.limit && !ps.localOnly) {
|
||||||
const otherUsers = await Users.createQueryBuilder('user')
|
const otherUsers = await Users.createQueryBuilder('user')
|
||||||
.where('user.host IS NOT NULL')
|
.where('user.host IS NOT NULL')
|
||||||
.where('user.isSuspended = FALSE')
|
.andWhere('user.isSuspended = FALSE')
|
||||||
.where('user.usernameLower like :username', { username: ps.query.replace('@', '').toLowerCase() + '%' })
|
.andWhere('user.usernameLower like :username', { username: ps.query.replace('@', '').toLowerCase() + '%' })
|
||||||
.take(ps.limit - users.length)
|
.take(ps.limit - users.length)
|
||||||
.getMany();
|
.getMany();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue