Reworked test_recipient() to use parameters instead of the stored recipient from

This commit is contained in:
Alfredo Cardigliano 2020-07-29 12:37:18 +02:00
parent c71187808b
commit 2772e2f217
2 changed files with 31 additions and 6 deletions

View file

@ -29,7 +29,8 @@ elseif (action == "edit") then
elseif (action == "remove") then
response.result = notification_recipients.delete_recipient(recipient_name)
elseif (action == "test") then
response.result = notification_recipients.test_recipient(recipient_name)
local endpoint_conf_name = _POST["endpoint_conf_name"]
response.result = notification_recipients.test_recipient(endpoint_conf_name, recipient_name, _POST)
else
traceError(TRACE_ERROR, TRACE_CONSOLE, "Invalid 'action' parameter.")
response.success = false