core: contest rule check

This commit is contained in:
undefined committed 2021-11-06 18:49:15 +08:00
1 parent 844c4535e6
commit f9c0437d16
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "3.1.24",
"version": "3.1.25",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
+1 -1
View File
@@ -220,7 +220,7 @@ export class ContestEditHandler extends Handler {
@param('duration', Types.Float)
@param('title', Types.Title)
@param('content', Types.Content)
@param('rule', Types.Range(contest.RULES))
@param('rule', Types.Range(Object.assign(contest.RULES).filter((i) => i !== 'homework')))
@param('pids', Types.Content)
@param('rated', Types.Boolean)
@param('code', Types.String, true)