Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function create_user(device) {
hue = new HueApi();
hue.createUser(device.ipaddress, function(err, user) {
if (err) console.log(err);
for (var i = 0; i < device_array.length; i++) {
if (device_array[i].id == device.id) {
device_array[i].user = user;
device_array[i].device_type = "lights";
device_array[i].local_ip = local_ip;
//device_array[i].token = token;
//device_array[i].mac = mac;
//store_device(device_array[i]);
find_lights(device_array[i]);
console.log("created user",device_array[i]);
}
}
});
}
function create_user(device) {
hue = new HueApi();
hue.createUser(device.ipaddress, function(err, user) {
if (err) console.log(err);
for (var i = 0; i < device_array.length; i++) {
if (device_array[i].id == device.id) {
device_array[i].user = user;
device_array[i].device_type = "lights";
device_array[i].local_ip = utils.local_ip;
//device_array[i].token = token;
//device_array[i].mac = mac;
//database.store_device(device_array[i]);
find_lights(device_array[i]);
console.log("created user",device_array[i]);
}
}
});
}