Added brackets to case statements (airbnb 15.5)
parent
37d9cdadf9
commit
74692eba95
|
@ -103,7 +103,7 @@ module.exports = (app, passport) => {
|
||||||
.catch((err) => { switch (err.responseCode) {
|
.catch((err) => { switch (err.responseCode) {
|
||||||
|
|
||||||
// Mailbox doesn't exist
|
// 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. `)
|
debug(`Failed to email new user ${user.id} instructions to create a password because the mailbox for ${user.email} wasn't found. `)
|
||||||
|
|
||||||
// Remove user
|
// Remove user
|
||||||
|
@ -118,10 +118,12 @@ module.exports = (app, passport) => {
|
||||||
break
|
break
|
||||||
|
|
||||||
// Other error
|
// Other error
|
||||||
default:
|
} default: {
|
||||||
debug(`Failed to email new user ${user.id} instructions to create a password!`)
|
debug(`Failed to email new user ${user.id} instructions to create a password!`)
|
||||||
mw.throwErr(err, req)
|
mw.throwErr(err, req)
|
||||||
res.redirect('/login#signup')
|
res.redirect('/login#signup')
|
||||||
|
}
|
||||||
|
|
||||||
} })
|
} })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -406,18 +406,19 @@ loadGoogleMapsAPI({ key: mapKey })
|
||||||
radius: rad
|
radius: rad
|
||||||
}, function (data, status) {
|
}, function (data, status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
// Success
|
// Success
|
||||||
case googlemaps.StreetViewStatus.OK:
|
case googlemaps.StreetViewStatus.OK: {
|
||||||
cb(data)
|
cb(data)
|
||||||
break
|
break
|
||||||
// No results in that radius
|
// No results in that radius
|
||||||
case googlemaps.StreetViewStatus.ZERO_RESULTS:
|
} case googlemaps.StreetViewStatus.ZERO_RESULTS: {
|
||||||
// Try again with a bigger radius
|
// Try again with a bigger radius
|
||||||
getStreetViewData(loc, rad * 2, cb)
|
getStreetViewData(loc, rad * 2, cb)
|
||||||
break
|
break
|
||||||
// Error
|
// Error
|
||||||
default:
|
} default:
|
||||||
console.error(new Error('Street view not available: ' + status).message)
|
console.error(new Error('Street view not available: ' + status).message)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue