Merge pull request #2076 from PandaWawawa/issue-2074

Issue 2074
This commit is contained in:
Neil Lathwood
2015-10-08 17:24:18 +01:00
3 changed files with 4 additions and 3 deletions
+1
View File
@@ -61,5 +61,6 @@ Contributors to LibreNMS:
- Matthew Scully <matt@mattz0r.me.uk> (mattz0r)
- Xavier Beaudouin <kiwi@oav.net> (xbeaudouin)
- Falk Stern <falk@fourecks.de> (fstern)
- Donovan Bridoux <donovan.bridoux@gmail.com> (PandaWawawa)
[1]: http://observium.org/ "Observium web site"
+1 -1
View File
@@ -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:
+2 -2
View File
@@ -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');