ui: 修复比赛中评测记录列表不会自动刷新的问题

This commit is contained in:
undefined committed 2021-08-02 10:46:35 +08:00
1 parent 998248e212
commit bc90574735
5 files changed
+11 -8

No files matched your search

+2 -2
View File
@@ -232,9 +232,9 @@ class RecordMainConnectionHandler extends ConnectionHandler {
// eslint-disable-next-line prefer-const
let [udoc, pdoc] = await Promise.all([
user.getById(this.domainId, rdoc.uid),
problem.get(this.domainId, rdoc.pid),
problem.get(rdoc.pdomain, rdoc.pid),
]);
const tdoc = this.tid ? contest.get(this.domainId, new ObjectID(this.tid)) : null;
const tdoc = this.tid ? await contest.get(this.domainId, new ObjectID(this.tid)) : null;
if (pdoc && !rdoc.contest) {
if (pdoc.hidden && !this.user.own(pdoc) && !this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN)) pdoc = null;
if (!this.user.hasPerm(PERM.PERM_VIEW_PROBLEM)) pdoc = null;