优化rating计算速度

This commit is contained in:
masnn committed 2020-06-09 13:22:04 +08:00
1 parent 45f1184d68
commit 55912b087d
22 files changed
+309 -178

No files matched your search

+2 -2
View File
@@ -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();
}
}