mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: limit ranking to joined users
This commit is contained in:
1 file changed
+1
-1
@@ -26,7 +26,7 @@ class DomainRankHandler extends Handler {
|
|||||||
@query('page', Types.PositiveInt, true)
|
@query('page', Types.PositiveInt, true)
|
||||||
async get(domainId: string, page = 1) {
|
async get(domainId: string, page = 1) {
|
||||||
const [dudocs, upcount, ucount] = await this.paginate(
|
const [dudocs, upcount, ucount] = await this.paginate(
|
||||||
domain.getMultiUserInDomain(domainId, { uid: { $gt: 1 }, rp: { $gt: 0 } }).sort({ rp: -1 }),
|
domain.getMultiUserInDomain(domainId, { uid: { $gt: 1 }, rp: { $gt: 0 }, join: true }).sort({ rp: -1 }),
|
||||||
page,
|
page,
|
||||||
'ranking',
|
'ranking',
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user