mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: userDetail: fix attended contest filter
This commit is contained in:
1 parent
4753621f78
commit
32e2ffc1db
1 file changed
+2
-2
@@ -357,9 +357,9 @@ class UserDetailHandler extends Handler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const tags = Object.entries(acInfo).sort((a, b) => b[1] - a[1]).slice(0, 20);
|
const tags = Object.entries(acInfo).sort((a, b) => b[1] - a[1]).slice(0, 20);
|
||||||
const tsdocs = await ContestModel.getMultiStatus(domainId, { uid: this.user._id, attend: { $exists: true } }).sort({ _id: 1 }).toArray();
|
const tsdocs = await ContestModel.getMultiStatus(domainId, { uid, attend: { $exists: true } }).project({ docId: 1 }).toArray();
|
||||||
const tdocs = await ContestModel.getMulti(domainId, { docId: { $in: tsdocs.map((i) => i.docId) } })
|
const tdocs = await ContestModel.getMulti(domainId, { docId: { $in: tsdocs.map((i) => i.docId) } })
|
||||||
.project({ docId: 1, title: 1, rule: 1 }).toArray();
|
.project({ docId: 1, title: 1, rule: 1 }).sort({ _id: -1 }).toArray();
|
||||||
this.response.template = 'user_detail.html';
|
this.response.template = 'user_detail.html';
|
||||||
this.response.body = {
|
this.response.body = {
|
||||||
isSelfProfile, udoc, sdoc, pdocs, tags, tdocs,
|
isSelfProfile, udoc, sdoc, pdocs, tags, tdocs,
|
||||||
|
|||||||
Reference in new issue
Block a user