|
|
|
@ -357,9 +357,9 @@ class UserDetailHandler extends Handler {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
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) } })
|
|
|
|
|
.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.body = {
|
|
|
|
|
isSelfProfile, udoc, sdoc, pdocs, tags, tdocs,
|
|
|
|
|