添加部分注释,修复一些功能

This commit is contained in:
masnn committed 2020-04-13 17:41:44 +08:00
1 parent f40e4e2c74
commit d3e36fcb6c
32 files changed
+320 -174

No files matched your search

+4 -3
View File
@@ -56,10 +56,12 @@ async function end(body) {
}
class JudgeHandler extends Handler {
async prepare(){
async prepare() {
this.checkPerm(PERM_JUDGE);
}
async get() {
async get({ check = false }) {
this.response.body = {};
if (check) return;
let rid = await queue.get('judge', false);
if (rid) {
let rdoc = await record.get(rid);
@@ -74,7 +76,6 @@ class JudgeHandler extends Handler {
};
this.response.body = { task };
}
else this.response.body = {};
}
async post_next() {
await next(this.request.body);