Fix for Airtime bandwidth limit suspension code

This commit is contained in:
Duncan Sommerville 2015-11-25 18:18:24 -05:00
parent 0fc4f6c26f
commit a67ae0a5e4
1 changed files with 3 additions and 3 deletions

View File

@ -162,12 +162,12 @@ class ApiController extends Zend_Controller_Action
$usage = Application_Model_Preference::getBandwidthLimitCounter();
if ($usage > Application_Model_Preference::getBandwidthLimit()) {
$CC_CONFIG = Config::getConfig();
$url = AIRTIMEPRO_API_URL . "/station/" . $CC_CONFIG['stationId'] . "/suspend";
// Hacky way to get the user ID...
$url = AIRTIMEPRO_API_URL . "/station/" . $CC_CONFIG['rabbitmq']['user'] . "/suspend";
$user = array('', $CC_CONFIG['apiKey'][0]);
$data = array('reason' => "Bandwidth limit exceeded");
try {
$result = Application_Common_HTTPHelper::doPost($url, $user, $data);
Logging::info($result);
Application_Common_HTTPHelper::doPost($url, $user, $data);
} catch (Exception $e) {
throw $e;
}