mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: update types
This commit is contained in:
1 parent
a2bbb7a0e3
commit
14e0bebe79
3 files changed
+5
-4
No files matched your search
@@ -508,7 +508,7 @@ export class ProblemSubmitHandler extends ProblemDetailHandler {
|
||||
throw new BadRequestError('Language not allowed.');
|
||||
}
|
||||
if (pretest) {
|
||||
if (setting.langs[lang]?.pretest) lang = setting.langs[lang].pretest;
|
||||
if (setting.langs[lang]?.pretest) lang = setting.langs[lang].pretest as string;
|
||||
if (setting.langs[lang]?.pretest === false) throw new BadRequestError('Cannot run pretest for this language.');
|
||||
if (!['default', 'fileio', 'remote_judge'].includes(this.response.body.pdoc.config?.type)) {
|
||||
throw new BadRequestError('unable to run pretest');
|
||||
|
||||
Reference in new issue
Block a user