mirror of
https://github.com/Akkadius/glass-isc-dhcp.git
synced 2025-07-31 01:24:56 +02:00
API sanity checks
This commit is contained in:
parent
ac87206551
commit
6eea9949b1
@ -8,8 +8,15 @@ router.get('/', function(req, res, next) {
|
|||||||
|
|
||||||
var count = 0;
|
var count = 0;
|
||||||
for (var key in dhcp_lease_data) {
|
for (var key in dhcp_lease_data) {
|
||||||
|
|
||||||
/* Mac OUI Lookup */
|
/* Mac OUI Lookup */
|
||||||
var mac_oui = dhcp_lease_data[key].mac.split(":").join("").toUpperCase().slice(0,6);
|
var mac_oui = "";
|
||||||
|
if(typeof dhcp_lease_data[key].mac.split(":").join("") !== "undefined") {
|
||||||
|
mac_oui = dhcp_lease_data[key].mac.split(":").join("").toUpperCase().slice(0, 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(mac_oui == "")
|
||||||
|
continue;
|
||||||
|
|
||||||
if(typeof stat_data[mac_oui] === "undefined")
|
if(typeof stat_data[mac_oui] === "undefined")
|
||||||
stat_data[mac_oui] = {};
|
stat_data[mac_oui] = {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user