mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
优化rating计算速度
This commit is contained in:
1 parent
45f1184d68
commit
55912b087d
22 files changed
+309
-178
No files matched your search
@@ -8,7 +8,7 @@ const { PermissionError } = require('../error');
|
||||
class SystemHandler extends Handler {
|
||||
async prepare() {
|
||||
if (!this.user.priv) throw new PermissionError('???');
|
||||
this.body = {
|
||||
this.response.body = {
|
||||
path: [
|
||||
['Hydro', '/'],
|
||||
['manage_main', '/manage'],
|
||||
@@ -58,7 +58,7 @@ class SystemScriptHandler extends SystemHandler {
|
||||
|
||||
async post({ id, args }) {
|
||||
// TODO Do not use console.log
|
||||
await global.Hydro.script[id].run(args, console.log);
|
||||
await global.Hydro.script[id].run(JSON.parse(args), console.log);
|
||||
this.back();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user