check for duplicated name in endpoint notification list

fix #3898
This commit is contained in:
gabryon99 2020-05-07 16:50:31 +02:00
parent f5afe9ecdd
commit ea1c60c99c
12 changed files with 33 additions and 17 deletions

View file

@ -13,7 +13,7 @@ local http_lint = require("http_lint")
local action = _POST["action"]
local function reportError(msg)
print(json.encode({ message = msg, success = false, csrf = ntop.getRandomCSRFValue() }))
print(json.encode({ message = msg, success = false}))
end
sendHTTPContentTypeHeader('application/json')
@ -29,7 +29,6 @@ local data = json.decode(json_data)
local response = {
csrf = ntop.getRandomCSRFValue()
}
if (action == "add") then