diff --git a/logic_linkkf.py b/logic_linkkf.py
index e07e099..c713ad4 100644
--- a/logic_linkkf.py
+++ b/logic_linkkf.py
@@ -508,6 +508,8 @@ class LogicLinkkf(object):
ret["data"] = whitelist_programs
ret["whitelist_program"] = ",".join(whitelist_programs)
ret["data"] = whitelist_programs
+ ret["whitelist_program"] = ",".join(whitelist_programs)
+ ret["data"] = whitelist_programs
ret["log"] = "No current data!!"
except Exception as e:
logger.error("Exception:%s", e)
diff --git a/mod_basic.py b/mod_basic.py
index 7adfea2..b4a2006 100644
--- a/mod_basic.py
+++ b/mod_basic.py
@@ -186,9 +186,10 @@ class ModuleBasic(PluginModuleBase):
if sub == "apply_new_season":
return jsonify(LogicLinkkf.apply_new_season(req.form["new_season"]))
if sub == "add_whitelist":
- payload = req.get_json()
+ payload = req.get_json(silent=True)
if payload is None:
- ret = LogicLinkkf.add_whitelist()
+ form_code = req.form.get("code", "").strip()
+ ret = LogicLinkkf.add_whitelist(form_code) if form_code != "" else LogicLinkkf.add_whitelist()
else:
ret = LogicLinkkf.add_whitelist(payload)
return jsonify(ret)
diff --git a/static/js/linkkf_request.js b/static/js/linkkf_request.js
index 359dd69..3e25443 100644
--- a/static/js/linkkf_request.js
+++ b/static/js/linkkf_request.js
@@ -30,7 +30,7 @@
const extraAttrs = (attrs || [])
.map((item) => ` data-${item.key}="${escapeHtml(item.value)}"`)
.join("");
- return ``;
+ return ``;
};
const mButtonGroup = (inner) =>
@@ -289,11 +289,11 @@
url: `/${package_name}/ajax/add_whitelist`,
type: "POST",
cache: false,
+ data: { code: currentData?.code || code || "" },
dataType: "json",
success: function (ret) {
if (ret.ret) {
notifySuccess("추가되었습니다.");
- renderProgram(ret);
} else {
notifyWarning(ret.log || "추가에 실패했습니다.");
}