luci-lua-runtime: dispatcher.lua: re-add post_on() dispatch action
Existing legacy Lua controllers still use the `post_on()` node dispatch action, so restore this functionality. Fixes: #6531 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
2fd74a8239
commit
18b637fed9
1 changed files with 6 additions and 2 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue