Fix parameter name in api/bandwidth-usage
This commit is contained in:
parent
bac1e553d9
commit
04167c103b
|
@ -145,11 +145,9 @@ class ApiController extends Zend_Controller_Action
|
||||||
* Update station bandwidth usage based on icecast log data
|
* Update station bandwidth usage based on icecast log data
|
||||||
*/
|
*/
|
||||||
public function bandwidthUsageAction() {
|
public function bandwidthUsageAction() {
|
||||||
// FIXME: this function is using placeholder names
|
$bandwidthUsage = json_decode($this->getRequest()->getParam("bandwidth_data"));
|
||||||
$bandwidthUsage = json_decode($this->getRequest()->getParam("bandwidth_usage"));
|
|
||||||
$usageBytes = 0;
|
$usageBytes = 0;
|
||||||
foreach ($bandwidthUsage as $entry) {
|
foreach ($bandwidthUsage as $entry) {
|
||||||
Logging::info($entry);
|
|
||||||
// TODO: store the IP address for future use
|
// TODO: store the IP address for future use
|
||||||
$ts = strtotime($entry->timestamp);
|
$ts = strtotime($entry->timestamp);
|
||||||
if ($ts > Application_Model_Preference::getBandwidthLimitUpdateTimer()) {
|
if ($ts > Application_Model_Preference::getBandwidthLimitUpdateTimer()) {
|
||||||
|
|
Loading…
Reference in New Issue