core: shouldn't sync pretest into tsdoc

This commit is contained in:
undefined committed 2021-06-06 11:41:05 +08:00
1 parent ddbcf42c9b
commit 5e0eb372f6
4 files changed
+41 -33

No files matched your search

+7 -5
View File
@@ -356,11 +356,13 @@ export class ContestDetailProblemSubmitHandler extends ContestProblemHandler {
tid,
});
const rdoc = await record.get(domainId, rid);
await Promise.all([
problem.inc(domainId, pid, 'nSubmit', 1),
domain.incUserInDomain(domainId, this.user._id, 'nSubmit'),
contest.updateStatus(domainId, tid, this.user._id, rid, pid),
]);
if (!pretest) {
await Promise.all([
problem.inc(domainId, pid, 'nSubmit', 1),
domain.incUserInDomain(domainId, this.user._id, 'nSubmit'),
contest.updateStatus(domainId, tid, this.user._id, rid, pid),
]);
}
bus.boardcast('record/change', rdoc);
if (!pretest && !contest.canShowRecord.call(this, this.tdoc)) {
this.response.body = { tid };