mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: add auto organize input option to hack (#780)
Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
1 parent
42569783f9
commit
ffe06804a7
7 files changed
+41
-5
No files matched your search
@@ -24,7 +24,7 @@ export default class RecordModel {
|
||||
'_id', 'score', 'time', 'memory', 'lang',
|
||||
'uid', 'pid', 'rejudged', 'progress', 'domainId',
|
||||
'contest', 'judger', 'judgeAt', 'status', 'source',
|
||||
'files',
|
||||
'files', 'hackTarget',
|
||||
];
|
||||
|
||||
static STAT_QUERY = {
|
||||
@@ -122,6 +122,7 @@ export default class RecordModel {
|
||||
contest?: ObjectId,
|
||||
input?: string,
|
||||
files?: Record<string, string>,
|
||||
hackTarget?: ObjectId,
|
||||
type: 'judge' | 'rejudge' | 'pretest' | 'hack' | 'generate',
|
||||
} = { type: 'judge' },
|
||||
) {
|
||||
@@ -146,6 +147,7 @@ export default class RecordModel {
|
||||
let isContest = !!args.contest;
|
||||
if (args.contest) data.contest = args.contest;
|
||||
if (args.files) data.files = args.files;
|
||||
if (args.hackTarget) data.hackTarget = args.hackTarget;
|
||||
if (args.type === 'rejudge') {
|
||||
args.type = 'judge';
|
||||
data.rejudged = true;
|
||||
|
||||
Reference in new issue
Block a user