Fix error-catch problem and some refactoring.

This commit is contained in:
Valverde Antonio
2014-07-30 16:45:17 +09:00
parent 4a6d375adc
commit daa1faaa29
5 changed files with 24 additions and 24 deletions

View File

@@ -22,7 +22,7 @@ module.exports = syrup.serial()
, reply.okay()
])
})
.error(function(err) {
.catch(function(err) {
log.error('Setting Wifi enabled failed', err.stack)
push.send([
channel
@@ -42,7 +42,7 @@ module.exports = syrup.serial()
, reply.okay(enabled ? 'wifi_enabled' : 'wifi_disabled')
])
})
.error(function(err) {
.catch(function(err) {
log.error('Getting Wifi status failed', err.stack)
push.send([
channel