From 6c9d80d4e8d2f9a7256fd3640a04d0e8172e3f71 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 8 Apr 2019 16:39:02 +0900 Subject: [PATCH] Fix bug --- src/server/api/endpoints/users/search.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/api/endpoints/users/search.ts b/src/server/api/endpoints/users/search.ts index 2e76546ad..443bd507f 100644 --- a/src/server/api/endpoints/users/search.ts +++ b/src/server/api/endpoints/users/search.ts @@ -69,8 +69,8 @@ export default define(meta, async (ps, me) => { if (isUsername) { users = await Users.createQueryBuilder('user') .where('user.host IS NULL') - .where('user.isSuspended = FALSE') - .where('user.usernameLower like :username', { username: ps.query.replace('@', '').toLowerCase() + '%' }) + .andWhere('user.isSuspended = FALSE') + .andWhere('user.usernameLower like :username', { username: ps.query.replace('@', '').toLowerCase() + '%' }) .take(ps.limit) .skip(ps.offset) .getMany(); @@ -78,8 +78,8 @@ export default define(meta, async (ps, me) => { if (users.length < ps.limit && !ps.localOnly) { const otherUsers = await Users.createQueryBuilder('user') .where('user.host IS NOT NULL') - .where('user.isSuspended = FALSE') - .where('user.usernameLower like :username', { username: ps.query.replace('@', '').toLowerCase() + '%' }) + .andWhere('user.isSuspended = FALSE') + .andWhere('user.usernameLower like :username', { username: ps.query.replace('@', '').toLowerCase() + '%' }) .take(ps.limit - users.length) .getMany();