diff --git a/AUTHORS.md b/AUTHORS.md index cefed25de..3f1ce8fb8 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -61,5 +61,6 @@ Contributors to LibreNMS: - Matthew Scully (mattz0r) - Xavier Beaudouin (xbeaudouin) - Falk Stern (fstern) +- Donovan Bridoux (PandaWawawa) [1]: http://observium.org/ "Observium web site" diff --git a/doc/API/API-Docs.md b/doc/API/API-Docs.md index 82f57b9f7..39bb0bcd8 100644 --- a/doc/API/API-Docs.md +++ b/doc/API/API-Docs.md @@ -603,7 +603,7 @@ Input: Example: ```curl -curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/alerts +curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/alerts?state=1 ``` Output: diff --git a/html/includes/api_functions.inc.php b/html/includes/api_functions.inc.php index 637e7f219..7141e7bbc 100644 --- a/html/includes/api_functions.inc.php +++ b/html/includes/api_functions.inc.php @@ -602,8 +602,8 @@ function list_alerts() { global $config; $app = \Slim\Slim::getInstance(); $router = $app->router()->getCurrentRoute()->getParams(); - if (isset($_POST['state'])) { - $param = array(mres($_POST['state'])); + if (isset($_GET['state'])) { + $param = array(mres($_GET['state'])); } else { $param = array('1');