core: submissionPriority for rejudge

This commit is contained in:
undefined committed 2022-03-01 22:00:17 +08:00
1 parent 8223b45d23
commit 250ae863d0
4 files changed
+10 -7

No files matched your search

+2 -1
View File
@@ -144,10 +144,11 @@ class RecordDetailHandler extends Handler {
@param('rid', Types.ObjectID)
async postRejudge(domainId: string, rid: ObjectID) {
this.checkPerm(PERM.PERM_REJUDGE);
const priority = await record.submissionPriority(this.user._id, -20);
const rdoc = await record.get(domainId, rid);
if (rdoc) {
await record.reset(domainId, rid, true);
await record.judge(domainId, rid, -10);
await record.judge(domainId, rid, priority);
}
this.back();
}