mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: file upload support
This commit is contained in:
1 parent
2539dfa412
commit
595f28b1df
5 files changed
+64
-22
No files matched your search
@@ -21,8 +21,8 @@ export async function parseConfig(config: string | ProblemConfig = {}) {
|
||||
let cfg: ProblemConfig = {};
|
||||
if (typeof config === 'string' && config.length) {
|
||||
// TODO should validate here?
|
||||
cfg = await readYamlCases(load(config) as Record<string, any>) as ProblemConfig;
|
||||
} else if (typeof config === 'object') cfg = config;
|
||||
cfg = await readYamlCases(load(config) as Record<string, any>);
|
||||
} else if (typeof config === 'object') cfg = await readYamlCases(config);
|
||||
if (cfg.subtasks.length) {
|
||||
for (const subtask of cfg.subtasks) {
|
||||
result.memoryMax = Math.max(result.memoryMax, subtask.memory);
|
||||
|
||||
Reference in new issue
Block a user