Without parameters get all the accounts of any type. Error returned fixed.

This commit is contained in:
Valverde Antonio
2014-08-12 18:26:52 +09:00
parent 57f4d2375f
commit 5a3fe3b5ac
7 changed files with 8 additions and 8 deletions

View File

@@ -48,9 +48,9 @@ module.exports = syrup.serial()
router.on(wire.AccountGetMessage, function(channel, message) {
var reply = wireutil.reply(options.serial)
log.info('Getting account(s) of type "%s"', message.type)
log.info('Getting account(s)')
service.getAccounts(message.type)
service.getAccounts(message)
.timeout(30000)
.then(function(accounts) {
push.send([

View File

@@ -490,10 +490,10 @@ module.exports = syrup.serial()
})
}
plugin.getAccounts = function(type) {
plugin.getAccounts = function(data) {
return runServiceCommand(
apk.wire.MessageType.GET_ACCOUNTS
, new apk.wire.GetAccountsRequest(type)
, new apk.wire.GetAccountsRequest({type: data.type})
)
.timeout(15000)
.then(function(data) {