一些优化

优化 Date.prototype.format
修复题目分类解析错误的问题
Interface Tdoc
X-Forwarded-For 支持
This commit is contained in:
undefined committed 2020-07-12 18:59:00 +08:00
1 parent 1722fbfaca
commit 82c193b5ee
19 files changed
+289 -182

No files matched your search

+4 -1
View File
@@ -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);
}
}