luci-lua-runtime: dispatcher.lua: re-add post_on() dispatch action
[project/luci.git] / modules / luci-lua-runtime / luasrc / dispatcher.lua
index 816c9f35e342deeaf285996237144d2bd26183d8..bbe7600c448c3a3026eaca656a741377aa72e9f7 100644 (file)
@@ -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",