strictNullChecks (#4666)
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip
This commit is contained in:
@@ -71,16 +71,16 @@ export default define(meta, async (ps, me) => {
|
||||
.where('user.host IS NULL')
|
||||
.andWhere('user.isSuspended = FALSE')
|
||||
.andWhere('user.usernameLower like :username', { username: ps.query.replace('@', '').toLowerCase() + '%' })
|
||||
.take(ps.limit)
|
||||
.take(ps.limit!)
|
||||
.skip(ps.offset)
|
||||
.getMany();
|
||||
|
||||
if (users.length < ps.limit && !ps.localOnly) {
|
||||
if (users.length < ps.limit! && !ps.localOnly) {
|
||||
const otherUsers = await Users.createQueryBuilder('user')
|
||||
.where('user.host IS NOT NULL')
|
||||
.andWhere('user.isSuspended = FALSE')
|
||||
.andWhere('user.usernameLower like :username', { username: ps.query.replace('@', '').toLowerCase() + '%' })
|
||||
.take(ps.limit - users.length)
|
||||
.take(ps.limit! - users.length)
|
||||
.getMany();
|
||||
|
||||
users = users.concat(otherUsers);
|
||||
|
Reference in New Issue
Block a user