mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: 修复nAccept计算异常的问题
This commit is contained in:
1 parent
2b6986bd58
commit
193b0dfa9d
2 files changed
+2
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.20.34",
|
||||
"version": "2.20.35",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user