parent
67b39b1a98
commit
346036ec88
|
@ -72,6 +72,7 @@ export default define(meta, async (ps, me) => {
|
||||||
q.andWhere('user.usernameLower like :username', { username: ps.username.toLowerCase() + '%' })
|
q.andWhere('user.usernameLower like :username', { username: ps.username.toLowerCase() + '%' })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
q.andWhere('user.updatedAt IS NOT NULL');
|
||||||
q.orderBy('user.updatedAt', 'DESC');
|
q.orderBy('user.updatedAt', 'DESC');
|
||||||
|
|
||||||
const users = await q.take(ps.limit!).skip(ps.offset).getMany();
|
const users = await q.take(ps.limit!).skip(ps.offset).getMany();
|
||||||
|
@ -82,6 +83,7 @@ export default define(meta, async (ps, me) => {
|
||||||
.where('user.host IS NULL')
|
.where('user.host IS NULL')
|
||||||
.andWhere('user.isSuspended = FALSE')
|
.andWhere('user.isSuspended = FALSE')
|
||||||
.andWhere('user.usernameLower like :username', { username: ps.username.toLowerCase() + '%' })
|
.andWhere('user.usernameLower like :username', { username: ps.username.toLowerCase() + '%' })
|
||||||
|
.andWhere('user.updatedAt IS NOT NULL')
|
||||||
.orderBy('user.updatedAt', 'DESC')
|
.orderBy('user.updatedAt', 'DESC')
|
||||||
.take(ps.limit!)
|
.take(ps.limit!)
|
||||||
.skip(ps.offset)
|
.skip(ps.offset)
|
||||||
|
@ -92,6 +94,7 @@ export default define(meta, async (ps, me) => {
|
||||||
.where('user.host IS NOT NULL')
|
.where('user.host IS NOT NULL')
|
||||||
.andWhere('user.isSuspended = FALSE')
|
.andWhere('user.isSuspended = FALSE')
|
||||||
.andWhere('user.usernameLower like :username', { username: ps.username.toLowerCase() + '%' })
|
.andWhere('user.usernameLower like :username', { username: ps.username.toLowerCase() + '%' })
|
||||||
|
.andWhere('user.updatedAt IS NOT NULL')
|
||||||
.orderBy('user.updatedAt', 'DESC')
|
.orderBy('user.updatedAt', 'DESC')
|
||||||
.take(ps.limit! - users.length)
|
.take(ps.limit! - users.length)
|
||||||
.getMany();
|
.getMany();
|
||||||
|
|
|
@ -74,6 +74,7 @@ export default define(meta, async (ps, me) => {
|
||||||
.where('user.host IS NULL')
|
.where('user.host IS NULL')
|
||||||
.andWhere('user.isSuspended = FALSE')
|
.andWhere('user.isSuspended = FALSE')
|
||||||
.andWhere('user.usernameLower like :username', { username: ps.query.replace('@', '').toLowerCase() + '%' })
|
.andWhere('user.usernameLower like :username', { username: ps.query.replace('@', '').toLowerCase() + '%' })
|
||||||
|
.andWhere('user.updatedAt IS NOT NULL')
|
||||||
.orderBy('user.updatedAt', 'DESC')
|
.orderBy('user.updatedAt', 'DESC')
|
||||||
.take(ps.limit!)
|
.take(ps.limit!)
|
||||||
.skip(ps.offset)
|
.skip(ps.offset)
|
||||||
|
@ -84,6 +85,7 @@ export default define(meta, async (ps, me) => {
|
||||||
.where('user.host IS NOT NULL')
|
.where('user.host IS NOT NULL')
|
||||||
.andWhere('user.isSuspended = FALSE')
|
.andWhere('user.isSuspended = FALSE')
|
||||||
.andWhere('user.usernameLower like :username', { username: ps.query.replace('@', '').toLowerCase() + '%' })
|
.andWhere('user.usernameLower like :username', { username: ps.query.replace('@', '').toLowerCase() + '%' })
|
||||||
|
.andWhere('user.updatedAt IS NOT NULL')
|
||||||
.orderBy('user.updatedAt', 'DESC')
|
.orderBy('user.updatedAt', 'DESC')
|
||||||
.take(ps.limit! - users.length)
|
.take(ps.limit! - users.length)
|
||||||
.getMany();
|
.getMany();
|
||||||
|
|
Loading…
Reference in New Issue