core: add support for class decorator

This commit is contained in:
undefined committed 2023-01-30 07:44:57 +08:00
1 parent 3807d12168
commit b1638c35cd
5 files changed
+27 -24

No files matched your search

+2 -3
View File
@@ -14,7 +14,6 @@ import record from '../model/record';
import * as setting from '../model/setting';
import * as system from '../model/system';
import user from '../model/user';
import * as bus from '../service/bus';
import {
ConnectionHandler, Handler, param, requireSudo, Types,
} from '../service/server';
@@ -176,7 +175,7 @@ class SystemSettingHandler extends SystemHandler {
}
}
await Promise.all(tasks);
await bus.broadcast('system/setting', args);
this.ctx.broadcast('system/setting', args);
this.back();
}
}
@@ -309,7 +308,7 @@ class SystemUserPrivHandler extends SystemHandler {
const defaultPriv = system.get('default.priv');
await user.coll.updateMany({ priv: defaultPriv }, { $set: { priv } });
await system.set('default.priv', priv);
bus.broadcast('user/delcache', true);
this.ctx.broadcast('user/delcache', true);
}
this.back();
}