Commit 96c37ff5 authored by Philippe's avatar Philippe

fix nil error and reformat text

parent 29499e1e
......@@ -18,10 +18,14 @@ end
function M.handle(data)
local sname = uci:get_first("gluon-node-info", "location")
if data._zip ~= nil then
uci:set("gluon-node-info", sname, "zip", data._zip:trim())
else
uci:delete("gluon-node-info", sname, "zip")
end
uci:save("gluon-node-info")
uci:commit("gluon-node-info")
end
return M
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment