judge: key check report

This commit is contained in:
undefined committed 2021-09-21 23:21:22 +08:00
1 parent cf4ef57f68
commit 132ef0312c
14 files changed
+38 -25

No files matched your search

+2 -1
View File
@@ -229,6 +229,7 @@ export default async function readCases(folder: string, cfg: Record<string, any>
result.subtasks = c.subtasks;
result.count = c.count;
}
if ((!args.key) || args.key !== result.key) isValidConfig(result);
if (args.key && args.key !== result.key) throw new FormatError('Incorrect secret key');
if (!args.key) isValidConfig(result);
return result;
}