core: also add postJudge for score_cancel

This commit is contained in:
undefined committed 2021-06-09 22:24:05 +08:00
1 parent 392de5c6e1
commit 4b3e2a8e50
3 files changed
+6 -4

No files matched your search

+3 -1
View File
@@ -1,4 +1,5 @@
import { FilterQuery, ObjectID } from 'mongodb';
import { postJudge } from './judge';
import {
ContestNotFoundError, PermissionError, ProblemNotFoundError,
RecordNotFoundError, UserNotFoundError,
@@ -150,10 +151,11 @@ class RecordDetailHandler extends Handler {
status: 9, score: 0, time: 0, memory: 0, message: 'score canceled',
}],
};
await Promise.all([
const [latest] = await Promise.all([
record.update(domainId, rid, $set),
bus.emit('record/change', rdoc, $set),
]);
await postJudge(latest);
}
this.back();
}