mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
fix hack rejudge & rejudge all
This commit is contained in:
1 parent
bdc0b21e88
commit
fe0cd78db7
5 files changed
+20
-10
No files matched your search
@@ -431,7 +431,11 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
|
||||
async postRejudge(domainId: string, pid: number) {
|
||||
this.checkPerm(PERM.PERM_REJUDGE_PROBLEM);
|
||||
// TODO maybe async?
|
||||
const rdocs = await record.getMulti(domainId, { pid, contest: { $ne: new ObjectID('0'.repeat(24)) } })
|
||||
const rdocs = await record.getMulti(domainId, {
|
||||
pid,
|
||||
contest: { $ne: new ObjectID('0'.repeat(24)) },
|
||||
status: { $ne: [STATUS.STATUS_HACK_SUCCESSFUL, STATUS.STATUS_HACK_UNSUCCESSFUL] },
|
||||
})
|
||||
.project({ _id: 1, contest: 1 }).toArray();
|
||||
const priority = await record.submissionPriority(this.user._id, -rdocs.length * 5 - 50);
|
||||
await Promise.all(rdocs.map(
|
||||
|
||||
Reference in new issue
Block a user