mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix user search return null (#651)
This commit is contained in:
1 parent
9f472dea74
commit
ba3c4776fa
1 file changed
+1
-1
@@ -401,7 +401,7 @@ class UserModel {
|
|||||||
.limit(limit).project({ _id: 1 }).toArray();
|
.limit(limit).project({ _id: 1 }).toArray();
|
||||||
const dudocs = await domain.getMultiUserInDomain(domainId, { displayName: { $regex } }).limit(limit).project({ uid: 1 }).toArray();
|
const dudocs = await domain.getMultiUserInDomain(domainId, { displayName: { $regex } }).limit(limit).project({ uid: 1 }).toArray();
|
||||||
const uids = uniq([...udocs.map(({ _id }) => _id), ...dudocs.map(({ uid }) => uid)]);
|
const uids = uniq([...udocs.map(({ _id }) => _id), ...dudocs.map(({ uid }) => uid)]);
|
||||||
return await Promise.all(uids.map(({ _id }) => UserModel.getById(domainId, _id)));
|
return await Promise.all(uids.map((_id) => UserModel.getById(domainId, _id)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ArgMethod
|
@ArgMethod
|
||||||
|
|||||||
Reference in new issue
Block a user