Add user_scripts subdir listing function

This commit is contained in:
emanuele-f 2019-12-23 10:28:07 +01:00
parent cc8c98581d
commit 6d4a1fda21
5 changed files with 63 additions and 7 deletions

View file

@ -81,7 +81,7 @@ elseif(action == "set_targets") then
return
end
local targets = http_lint.parseConfsetTargets(subdir, targets)
local targets, err = http_lint.parseConfsetTargets(subdir, targets)
if(targets ~= nil) then
-- Validation ok
@ -94,7 +94,10 @@ elseif(action == "set_targets") then
else
-- Validation error
result.success = false
result.error = "Validation error"
result.error = err
-- Can be used to trigger a new request
result.csrf = ntop.getRandomCSRFValue()
end
else
traceError(TRACE_ERROR, TRACE_CONSOLE, "Unknown action '".. action .. "'")