Commit 6076388f authored by Larry Sachs's avatar Larry Sachs

Remove unnecessary whitespace

Change-Id: Ie1c8dca4bf3b78967b0f25e3d1be2eacdd442cb0
Signed-off-by: Larry Sachs's avatarLarry Sachs <larry.j.sachs@intel.com>
parent 12295f91
......@@ -54,7 +54,7 @@ var handlers = {
var lightBrightness = this.event.request.intent.slots.lightBrightness.value;
console.log("lightName: " + lightName);
console.log("lightBrightness: " + lightBrightness);
if (!lightName || !lightBrightness) {
this.emit(":tell", "Sorry, I didn't get that");
} else {
......@@ -245,7 +245,7 @@ var postGetLights = {
}
console.log("desired lightDevices["+index+"]: "+JSON.stringify(lightDevices[index]));
});
var desiredLightState =
var desiredLightState =
{"state":{"desired":{"device":thingName,"lightDevices":lightDevices}}};
var thingNameAndPayload = {
......@@ -282,7 +282,7 @@ var postGetLights = {
}
console.log("desired lightDevices["+index+"]: "+JSON.stringify(lightDevices[index]));
});
var desiredLightState =
var desiredLightState =
{"state":{"desired":{"device":thingName,"lightDevices":lightDevices}}};
var thingNameAndPayload = {
......@@ -320,7 +320,7 @@ var postGetLights = {
}
console.log("desired lightDevices["+index+"]: "+JSON.stringify(lightDevices[index]));
});
// sort desired light devices by name (ignoring case)
lightDevices.sort((lhs, rhs) => {
var lhsName = lhs.name.toLowerCase();
......@@ -338,8 +338,8 @@ var postGetLights = {
lightDevices.forEach((item, index, array) => {
console.log("sorted desired lightDevices["+index+"]: "+JSON.stringify(item));
});
var desiredLightState =
var desiredLightState =
{"state":{"desired":{"device":thingName,"lightDevices":lightDevices}}};
var thingNameAndPayload = {
......
......@@ -217,7 +217,7 @@ function getDevicesFromAwsIot(userAccessToken, callback) {
});
}
}
const response = {
event: {
header: {
......@@ -337,14 +337,14 @@ function setAwsIotDeviceState(userAccessToken, endpointId, correlationToken, pow
if (!err) {
console.log("DEBUG", "Response: " + JSON.stringify(response, null, 2));
callback(null, response);
} else {
const message = "Unable to set device state";
console.log("ERROR", message);
callback(null, generateErrorResponse("INTERNAL_ERROR", message, endpointId, correlationToken));
}
});
} else {
const message = "EndpointId not found in device list";
console.log("ERROR", message);
......@@ -378,7 +378,7 @@ function handleDiscovery(request, callback) {
function handleReportState(request, callback) {
console.log("DEBUG", "ReportState Request: " + JSON.stringify(request, null, 2));
const correlationToken = request.directive.header.correlationToken;
console.log("DEBUG", "correlationToken: " + correlationToken);
......@@ -422,7 +422,7 @@ function handleReportState(request, callback) {
function handleControl(request, callback) {
console.log("DEBUG", "Control Request: " + JSON.stringify(request, null, 2));
const correlationToken = request.directive.header.correlationToken;
const endpointId = request.directive.endpoint.endpointId;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment