From 08a5fb75fd74c6ebb2c112f8fcfecff42b1efdf1 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Tue, 23 Jun 2020 07:24:57 -0600 Subject: [PATCH] Fix lint errors. Signed-off-by: Dave Smith Change-Id: I64d7b901d5362bfa07506d2f5b24426425992e1f --- washer-done/functions/index.js | 24 ++++++++++++++---------- washer-start/functions/index.js | 12 ++++++++---- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/washer-done/functions/index.js b/washer-done/functions/index.js index d823cbf..39a5548 100644 --- a/washer-done/functions/index.js +++ b/washer-done/functions/index.js @@ -41,8 +41,11 @@ exports.login = functions.https.onRequest((request, response) => {
- - + +
@@ -63,8 +66,9 @@ exports.fakeauth = functions.https.onRequest((request, response) => { const responseurl = util.format('%s?code=%s&state=%s', decodeURIComponent(request.query.redirect_uri), 'xxxxxx', request.query.state); - console.log(`Set redirect as ${responseurl}`) - return response.redirect(`/login?responseurl=${encodeURIComponent(responseurl)}`); + console.log(`Set redirect as ${responseurl}`); + return response.redirect( + `/login?responseurl=${encodeURIComponent(responseurl)}`); }); exports.faketoken = functions.https.onRequest((request, response) => { @@ -209,12 +213,12 @@ app.onQuery(async (body) => { const intent = body.inputs[0]; for (const device of intent.payload.devices) { const deviceId = device.id; - queryPromises.push(queryDevice(deviceId) - .then((data) => { - // Add response to device payload - payload.devices[deviceId] = data; - }, - )); + queryPromises.push( + queryDevice(deviceId) + .then((data) => { + // Add response to device payload + payload.devices[deviceId] = data; + }) ); } // Wait for all promises to resolve await Promise.all(queryPromises); diff --git a/washer-start/functions/index.js b/washer-start/functions/index.js index c2c60ec..c848e8f 100644 --- a/washer-start/functions/index.js +++ b/washer-start/functions/index.js @@ -41,8 +41,11 @@ exports.login = functions.https.onRequest((request, response) => {
- - + +
@@ -63,8 +66,9 @@ exports.fakeauth = functions.https.onRequest((request, response) => { const responseurl = util.format('%s?code=%s&state=%s', decodeURIComponent(request.query.redirect_uri), 'xxxxxx', request.query.state); - console.log(`Set redirect as ${responseurl}`) - return response.redirect(`/login?responseurl=${encodeURIComponent(responseurl)}`); + console.log(`Set redirect as ${responseurl}`); + return response.redirect( + `/login?responseurl=${encodeURIComponent(responseurl)}`); }); exports.faketoken = functions.https.onRequest((request, response) => {