judge: fix key check

This commit is contained in:
undefined committed 2021-09-22 14:32:08 +08:00
1 parent 1140f85654
commit f21ff16ef1
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -229,7 +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) throw new FormatError('Incorrect secret key');
if (!args.key) isValidConfig(result);
if (result.key && args.key !== result.key) throw new FormatError('Incorrect secret key');
if (!result.key) isValidConfig(result);
return result;
}