core: 修复nAccept计算异常的问题

This commit is contained in:
undefined committed 2021-03-26 17:05:55 +08:00
1 parent 2b6986bd58
commit 193b0dfa9d
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ async function _postJudge(rdoc: Rdoc) {
rdoc.domainId, rdoc.contest.tid, rdoc.uid,
rdoc._id, rdoc.pid, accept, rdoc.score, rdoc.contest.type,
);
} else if (updated) await domain.incUserInDomain(rdoc.domainId, rdoc.uid, 'nAccept', 1);
} else if (accept && updated) await domain.incUserInDomain(rdoc.domainId, rdoc.uid, 'nAccept', 1);
const pdoc = (accept && updated)
? await problem.inc(rdoc.domainId, rdoc.pid, 'nAccept', 1)
: await problem.get(rdoc.domainId, rdoc.pid);