summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Sachs <larry.j.sachs@intel.com>2017-12-21 09:53:38 -0800
committerLarry Sachs <larry.j.sachs@intel.com>2017-12-21 09:53:38 -0800
commit6076388f323aae19440bc0a892d1168b8c7abbf7 (patch)
treeb11271530b9e122d793475da3ed96b56108dedf2
parent12295f918f5bee283fb858fe5bbb0ceba417c62a (diff)
Remove unnecessary whitespace
Change-Id: Ie1c8dca4bf3b78967b0f25e3d1be2eacdd442cb0 Signed-off-by: Larry Sachs <larry.j.sachs@intel.com>
-rw-r--r--alexa-bridge-skill-lambda/index.js12
-rw-r--r--alexa-smart-home-skill-lambda/index.js10
2 files changed, 11 insertions, 11 deletions
diff --git a/alexa-bridge-skill-lambda/index.js b/alexa-bridge-skill-lambda/index.js
index 4e1c5c9..6256439 100644
--- a/alexa-bridge-skill-lambda/index.js
+++ b/alexa-bridge-skill-lambda/index.js
@@ -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 = {
diff --git a/alexa-smart-home-skill-lambda/index.js b/alexa-smart-home-skill-lambda/index.js
index ced7734..1950158 100644
--- a/alexa-smart-home-skill-lambda/index.js
+++ b/alexa-smart-home-skill-lambda/index.js
@@ -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;