mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&judge: support lang filter
This commit is contained in:
3 files changed
+6
-3
No files matched your search
@@ -294,8 +294,6 @@ class JudgeConnectionHandler extends ConnectionHandler {
|
||||
await updateJudge(msg.info);
|
||||
} else if (msg.key === 'prio' && typeof msg.prio === 'number') {
|
||||
this.query.priority = { $gt: msg.prio };
|
||||
} else if (msg.key === 'lang' && msg.lang instanceof Array && msg.lang.every((i) => typeof i === 'string')) {
|
||||
this.query.lang = { $in: msg.lang };
|
||||
} else if (msg.key === 'config') {
|
||||
if (Number.isSafeInteger(msg.prio)) {
|
||||
this.query.priority = { $gt: msg.prio };
|
||||
@@ -309,6 +307,9 @@ class JudgeConnectionHandler extends ConnectionHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (msg.lang instanceof Array && msg.lang.every((i) => typeof i === 'string')) {
|
||||
this.query.lang = { $in: msg.lang };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user