mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
使用url()来构建url
This commit is contained in:
1 parent
0efac48bde
commit
86f67a0ec3
61 files changed
+262
-275
No files matched your search
+2
-10
@@ -83,10 +83,6 @@ async function end(body) {
|
||||
}
|
||||
|
||||
class JudgeHandler extends Handler {
|
||||
async prepare() {
|
||||
this.checkPerm(PERM_JUDGE);
|
||||
}
|
||||
|
||||
async get({ check = false }) {
|
||||
if (check) return;
|
||||
const tasks = [];
|
||||
@@ -109,10 +105,6 @@ class JudgeHandler extends Handler {
|
||||
}
|
||||
|
||||
class JudgeConnectionHandler extends ConnectionHandler {
|
||||
async prepare() {
|
||||
this.checkPerm(PERM_JUDGE);
|
||||
}
|
||||
|
||||
async message(msg) {
|
||||
if (msg.key === 'next') await next(msg);
|
||||
else if (msg.key === 'end') {
|
||||
@@ -133,8 +125,8 @@ class JudgeConnectionHandler extends ConnectionHandler {
|
||||
}
|
||||
|
||||
async function apply() {
|
||||
Route('/judge', JudgeHandler);
|
||||
Connection('/judge/conn', JudgeConnectionHandler);
|
||||
Route('judge', '/judge', JudgeHandler, PERM_JUDGE);
|
||||
Connection('judge_conn', '/judge/conn', JudgeConnectionHandler, PERM_JUDGE);
|
||||
}
|
||||
|
||||
apply.next = next;
|
||||
|
||||
Reference in new issue
Block a user