🔥 Sync 2026-05-23 20:23:16

This commit is contained in:
github-actions[bot] committed 2026-05-23 20:23:16 +08:00
1 parent 252b818cc5
commit b77bf4e6e9
49 files changed
+2005 -1916

No files matched your search

@@ -61,6 +61,7 @@ function index()
entry({"admin", "services", appname, "server_user"}, cbi(appname .. "/server/user")).leaf = true
--[[ API ]]
entry({"admin", "services", appname, "server_user_update"}, call("server_user_update")).leaf = true
entry({"admin", "services", appname, "server_user_status"}, call("server_user_status")).leaf = true
entry({"admin", "services", appname, "server_user_log"}, call("server_user_log")).leaf = true
entry({"admin", "services", appname, "server_get_log"}, call("server_get_log")).leaf = true
@@ -807,6 +808,23 @@ function rollback_rules()
http_write_json_ok()
end
function server_user_update()
local id = http.formvalue("id") -- Node id
local data = http.formvalue("data") -- json new Data
if id and data then
local data_t = jsonParse(data) or {}
if next(data_t) then
for k, v in pairs(data_t) do
uci:set(appname .. "_server", id, k, v)
end
api.uci_save(uci, appname .. "_server")
http_write_json_ok()
return
end
end
http_write_json_error()
end
function server_user_status()
local e = {}
e.index = http.formvalue("index")