mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
一些优化
优化 Date.prototype.format 修复题目分类解析错误的问题 Interface Tdoc X-Forwarded-For 支持
This commit is contained in:
1 parent
1722fbfaca
commit
82c193b5ee
19 files changed
+289
-182
No files matched your search
@@ -15,6 +15,7 @@ function set(key, value) {
|
||||
if (setting.SYSTEM_SETTINGS_BY_KEY[key]) {
|
||||
const s = setting.SYSTEM_SETTINGS_BY_KEY[key];
|
||||
if (s.flag & setting.FLAG_DISABLED) return undefined;
|
||||
if (s.flag & setting.FLAG_SECRET && !value) return undefined;
|
||||
if (s.type === 'boolean') {
|
||||
if (value === 'on') return true;
|
||||
return false;
|
||||
@@ -48,6 +49,8 @@ class SystemMainHandler extends SystemHandler {
|
||||
}
|
||||
|
||||
class SystemCheckConnHandler extends ConnectionHandler {
|
||||
id: any;
|
||||
|
||||
async prepare() {
|
||||
this.checkPriv(PRIV.PRIV_EDIT_SYSTEM);
|
||||
await this.check();
|
||||
@@ -61,7 +64,7 @@ class SystemCheckConnHandler extends ConnectionHandler {
|
||||
}
|
||||
|
||||
async cleanup() {
|
||||
check.cancel(this.token);
|
||||
check.cancel(this.id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user