mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Removed legacy code from transports (#10081)
This commit is contained in:
committed by
Tony Murray
parent
c76115bf46
commit
d31a551464
@@ -30,24 +30,11 @@ class Api extends Transport
|
||||
{
|
||||
public function deliverAlert($obj, $opts)
|
||||
{
|
||||
if (empty($this->config)) {
|
||||
return $this->deliverAlertOld($obj, $opts);
|
||||
}
|
||||
$url = $this->config['api-url'];
|
||||
$method = $this->config['api-method'];
|
||||
return $this->contactAPI($obj, $url, $method);
|
||||
}
|
||||
|
||||
private function deliverAlertOld($obj, $opts)
|
||||
{
|
||||
foreach ($opts as $method => $apis) {
|
||||
foreach ($apis as $api) {
|
||||
$this->contactAPI($obj, $api, $method);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private function contactAPI($obj, $api, $method)
|
||||
{
|
||||
$method = strtolower($method);
|
||||
|
Reference in New Issue
Block a user