mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
bug fixes & improvements for on site contest
This commit is contained in:
19 files changed
+383
-68
No files matched your search
@@ -519,7 +519,10 @@ export class ProblemSubmitHandler extends ProblemDetailHandler {
|
||||
await storage.put(`submission/${this.user._id}/${id}`, file.filepath, this.user._id);
|
||||
files.code = `${this.user._id}/${id}#${file.originalFilename}`;
|
||||
}
|
||||
} else if (code.length > lengthLimit) throw new ValidationError('code');
|
||||
} else {
|
||||
code = code.replace(/\r\n/g, '\n');
|
||||
if (code.length > lengthLimit) throw new ValidationError('code');
|
||||
}
|
||||
const rid = await record.add(
|
||||
domainId, this.pdoc.docId, this.user._id, lang, code, true,
|
||||
pretest ? { input, type: 'pretest' } : { contest: tid, files, type: 'judge' },
|
||||
|
||||
Reference in new issue
Block a user