mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: handle booleanKeys in domain_edit
This commit is contained in:
1 file changed
+3
@@ -53,6 +53,9 @@ class DomainEditHandler extends ManageHandler {
|
|||||||
async post(args) {
|
async post(args) {
|
||||||
if (args.operation) return;
|
if (args.operation) return;
|
||||||
const $set = {};
|
const $set = {};
|
||||||
|
const booleanKeys = args.booleanKeys || {};
|
||||||
|
delete args.booleanKeys;
|
||||||
|
for (const key in booleanKeys) if (!args[key]) $set[key] = false;
|
||||||
for (const key in args) {
|
for (const key in args) {
|
||||||
if (DOMAIN_SETTINGS_BY_KEY[key]) $set[key] = args[key];
|
if (DOMAIN_SETTINGS_BY_KEY[key]) $set[key] = args[key];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user