From 2d8299338e6c77fb15c457f5cf7f34dc0278db60 Mon Sep 17 00:00:00 2001 From: Anton Kikin Date: Tue, 18 Feb 2020 14:00:01 +0300 Subject: [PATCH] luci-base: Add missed config parameter for cbi when converting to JSON The cbi() function has a second argument 'config' in which various configuration parameters can be passed. When converting the lua menu to JSON, we must also convert this parameter. Signed-off-by: Anton Kikin --- modules/luci-base/luasrc/dispatcher.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua index c227b68c8..118ca221a 100644 --- a/modules/luci-base/luasrc/dispatcher.lua +++ b/modules/luci-base/luasrc/dispatcher.lua @@ -193,7 +193,8 @@ local function target_to_json(target, module) elseif target.type == "cbi" then action = { ["type"] = "cbi", - ["path"] = target.model + ["path"] = target.model, + ["config"] = target.config } elseif target.type == "form" then action = { -- 2.25.1