core: handle booleanKeys in domain_edit

This commit is contained in:
undefined committed 2024-12-21 13:55:42 +08:00
1 parent f024f75a9b
commit 1123e02f5e
1 file changed
+3
+3
View File
@@ -53,6 +53,9 @@ class DomainEditHandler extends ManageHandler {
async post(args) {
if (args.operation) return;
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) {
if (DOMAIN_SETTINGS_BY_KEY[key]) $set[key] = args[key];
}