forked from FoundKeyGang/FoundKey
Fix users/search (#4505)
This commit is contained in:
parent
e97951fc51
commit
ee29ab95be
1 changed files with 2 additions and 2 deletions
|
@ -71,7 +71,7 @@ export default define(meta, async (ps, me) => {
|
||||||
.find({
|
.find({
|
||||||
host: null,
|
host: null,
|
||||||
usernameLower: new RegExp('^' + escapeRegexp(ps.query.replace('@', '').toLowerCase())),
|
usernameLower: new RegExp('^' + escapeRegexp(ps.query.replace('@', '').toLowerCase())),
|
||||||
isSuspended: false
|
isSuspended: { $ne: true }
|
||||||
}, {
|
}, {
|
||||||
limit: ps.limit,
|
limit: ps.limit,
|
||||||
skip: ps.offset
|
skip: ps.offset
|
||||||
|
@ -82,7 +82,7 @@ export default define(meta, async (ps, me) => {
|
||||||
.find({
|
.find({
|
||||||
host: { $ne: null },
|
host: { $ne: null },
|
||||||
usernameLower: new RegExp('^' + escapeRegexp(ps.query.replace('@', '').toLowerCase())),
|
usernameLower: new RegExp('^' + escapeRegexp(ps.query.replace('@', '').toLowerCase())),
|
||||||
isSuspended: false
|
isSuspended: { $ne: true }
|
||||||
}, {
|
}, {
|
||||||
limit: ps.limit - users.length
|
limit: ps.limit - users.length
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue