mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix hack data add to testdata
This commit is contained in:
1 parent
e0929476d5
commit
bdc0b21e88
4 files changed
+4
-3
No files matched your search
@@ -85,7 +85,7 @@ export async function postJudge(rdoc: RecordDoc) {
|
||||
try {
|
||||
const config = yaml.load(pdoc.config as string) as ProblemConfigFile;
|
||||
assert(config.subtasks instanceof Array);
|
||||
const file = await storage.get(`submission/${rdoc.files.hack}`);
|
||||
const file = await storage.get(`submission/${rdoc.files.hack.split('#')[0]}`);
|
||||
assert(file);
|
||||
const hackSubtask = config.subtasks[config.subtasks.length - 1];
|
||||
hackSubtask.cases ||= [];
|
||||
|
||||
@@ -564,6 +564,7 @@ export class ProblemHackHandler extends ProblemDetailHandler {
|
||||
this.response.body = {
|
||||
pdoc: this.pdoc,
|
||||
udoc: this.udoc,
|
||||
rid: this.rdoc._id,
|
||||
title: this.pdoc.title,
|
||||
page_name: this.tdoc ? 'contest_detail_problem_hack' : 'problem_hack',
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user