From 74692eba95b7d0a427e6be962fbb6d2d55633f02 Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Thu, 21 Dec 2017 12:41:04 -0500 Subject: [PATCH] Added brackets to case statements (airbnb 15.5) --- config/routes/auth.js | 6 ++++-- static/js/map.js | 15 ++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/config/routes/auth.js b/config/routes/auth.js index 869472e..2fe5dea 100644 --- a/config/routes/auth.js +++ b/config/routes/auth.js @@ -103,7 +103,7 @@ module.exports = (app, passport) => { .catch((err) => { switch (err.responseCode) { // Mailbox doesn't exist - case 550: + case 550: { debug(`Failed to email new user ${user.id} instructions to create a password because the mailbox for ${user.email} wasn't found. `) // Remove user @@ -118,10 +118,12 @@ module.exports = (app, passport) => { break // Other error - default: + } default: { debug(`Failed to email new user ${user.id} instructions to create a password!`) mw.throwErr(err, req) res.redirect('/login#signup') + } + } }) } }) diff --git a/static/js/map.js b/static/js/map.js index 0be0d95..b0a45f2 100644 --- a/static/js/map.js +++ b/static/js/map.js @@ -406,18 +406,19 @@ loadGoogleMapsAPI({ key: mapKey }) radius: rad }, function (data, status) { switch (status) { - // Success - case googlemaps.StreetViewStatus.OK: + // Success + case googlemaps.StreetViewStatus.OK: { cb(data) break - // No results in that radius - case googlemaps.StreetViewStatus.ZERO_RESULTS: - // Try again with a bigger radius + // No results in that radius + } case googlemaps.StreetViewStatus.ZERO_RESULTS: { + // Try again with a bigger radius getStreetViewData(loc, rad * 2, cb) break - // Error - default: + // Error + } default: console.error(new Error('Street view not available: ' + status).message) + } } }) }