Added ifid param to rest/get/alert/data.lua

This commit is contained in:
Alfredo Cardigliano 2019-04-29 19:15:24 +02:00
parent 9dbff41aa0
commit 79c8da25d8
2 changed files with 16 additions and 0 deletions

View file

@ -14,8 +14,16 @@ local json = require "dkjson"
sendHTTPHeader('application/json')
local ifid = _GET["ifid"]
local status = _GET["status"]
local if_name = nil
if not isEmptyString(ifid) then
if_name = getInterfaceName(ifid)
end
interface.select(if_name)
local engaged = false
if status == "engaged" then
engaged = true