core&ui&judge: allow run multiple pretests in single request (#1098)

This commit is contained in:
undefined authored and GitHub committed 2025-12-28 06:07:45 +08:00
1 parent c45975ae33
commit 114be2848b
8 files changed
+53 -39

No files matched your search

+2 -2
View File
@@ -131,7 +131,7 @@ export default class RecordModel {
lang: string, code: string, addTask: boolean,
args: {
contest?: ObjectId;
input?: string;
input?: string[];
files?: Record<string, string>;
hackTarget?: ObjectId;
type: 'judge' | 'rejudge' | 'pretest' | 'hack' | 'generate';
@@ -165,7 +165,7 @@ export default class RecordModel {
args.type = 'judge';
data.rejudged = true;
} else if (args.type === 'pretest') {
data.input = args.input || '';
data.input = args.input || [];
isContest = false;
data.contest = RecordModel.RECORD_PRETEST;
} else if (args.type === 'generate') {