WIP
This commit is contained in:
parent
d6ec60db55
commit
184d30209a
4 changed files with 74 additions and 29 deletions
|
|
@ -46,13 +46,13 @@ function buildRates () {
|
|||
function buildBalances () {
|
||||
var cryptoCodes = plugins.getcryptoCodes()
|
||||
|
||||
var balances = {}
|
||||
var _balances = {}
|
||||
cryptoCodes.forEach(function (cryptoCode) {
|
||||
var balance = plugins.fiatBalance(cryptoCode)
|
||||
balances[cryptoCode] = balance
|
||||
_balances[cryptoCode] = balance
|
||||
})
|
||||
|
||||
return balances
|
||||
return _balances
|
||||
}
|
||||
|
||||
function poll (req, res) {
|
||||
|
|
@ -106,6 +106,7 @@ function trade (req, res) {
|
|||
tx.cryptoAtoms = new BigNumber(tx.cryptoAtoms)
|
||||
|
||||
plugins.trade(session(req), tx, function (err) {
|
||||
if (err) logger.error(err)
|
||||
var statusCode = err ? 500 : 201
|
||||
res.json(statusCode, {err: err})
|
||||
})
|
||||
|
|
@ -235,7 +236,6 @@ function init (localConfig) {
|
|||
})
|
||||
|
||||
localApp.post('/reboot', function (req, res) {
|
||||
console.log('DEBUG1')
|
||||
var pid = req.body.pid
|
||||
var fingerprint = req.body.fingerprint
|
||||
console.log('pid: %s, fingerprint: %s', pid, fingerprint)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue