mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: 修复设置中无法取消选中checkbox的问题
This commit is contained in:
1 parent
7a41fecb0e
commit
a81d514b10
11 files changed
+29
-21
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.20.0",
|
||||
"version": "2.20.1",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
@@ -28,7 +28,7 @@
|
||||
"minio": "7.0.17",
|
||||
"moment-timezone": "^0.5.32",
|
||||
"mongodb": "^3.6.4",
|
||||
"nodemailer": "^6.4.18",
|
||||
"nodemailer": "^6.5.0",
|
||||
"p-queue": "^6.6.2",
|
||||
"serialize-javascript": "^5.0.1",
|
||||
"sockjs": "^0.3.20",
|
||||
@@ -39,16 +39,16 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/adm-zip": "^0.4.33",
|
||||
"@types/fs-extra": "^9.0.7",
|
||||
"@types/fs-extra": "^9.0.8",
|
||||
"@types/inquirer": "^7.3.1",
|
||||
"@types/js-yaml": "^4.0.0",
|
||||
"@types/koa": "^2.13.0",
|
||||
"@types/koa": "^2.13.1",
|
||||
"@types/koa-router": "^7.4.1",
|
||||
"@types/koa-static-cache": "^5.1.0",
|
||||
"@types/lodash": "^4.14.168",
|
||||
"@types/lru-cache": "^5.1.0",
|
||||
"@types/minio": "^7.0.7",
|
||||
"@types/mongodb": "^3.6.8",
|
||||
"@types/mongodb": "^3.6.9",
|
||||
"@types/nodemailer": "^6.4.0",
|
||||
"@types/serialize-javascript": "^5.0.0",
|
||||
"@types/sockjs": "^0.3.32",
|
||||
|
||||
@@ -159,7 +159,7 @@ class JudgeConnectionHandler extends ConnectionHandler {
|
||||
async cleanup() {
|
||||
if (this.processing) {
|
||||
await record.reset(this.processing.domainId, this.processing.rid, false);
|
||||
task.add(this.processing);
|
||||
await task.add(this.processing);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,6 +144,8 @@ class SystemSettingHandler extends SystemHandler {
|
||||
|
||||
async post(args: any) {
|
||||
const tasks = [];
|
||||
const booleanKeys = args.booleanKeys || {};
|
||||
delete args.booleanKeys;
|
||||
for (const key in args) {
|
||||
if (typeof args[key] === 'object') {
|
||||
for (const subkey in args[key]) {
|
||||
@@ -154,6 +156,13 @@ class SystemSettingHandler extends SystemHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const key in booleanKeys) {
|
||||
if (typeof booleanKeys[key] === 'object') {
|
||||
for (const subkey in booleanKeys[key]) {
|
||||
if (!args[key][subkey]) tasks.push(system.set(`${key}.${subkey}`, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
tasks.push(bus.parallel('system/setting', args));
|
||||
await Promise.all(tasks);
|
||||
this.back();
|
||||
|
||||
Reference in new issue
Block a user