summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--modules/luci-lua-runtime/luasrc/dispatcher.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/luci-lua-runtime/luasrc/dispatcher.lua b/modules/luci-lua-runtime/luasrc/dispatcher.lua
index 816c9f35e3..bbe7600c44 100644
--- a/modules/luci-lua-runtime/luasrc/dispatcher.lua
+++ b/modules/luci-lua-runtime/luasrc/dispatcher.lua
@@ -386,16 +386,20 @@ function call(name, ...)
}
end
-function post(name, ...)
+function post_on(params, name, ...)
return {
["type"] = "call",
["module"] = __controller,
["function"] = name,
["parameters"] = select('#', ...) > 0 and {...} or nil,
- ["post"] = true
+ ["post"] = params
}
end
+function post(...)
+ return post_on(true, ...)
+end
+
function view(name)
return {
["type"] = "view",