post-merge cleanup

This commit is contained in:
Josh Harvey 2016-04-19 19:35:08 +03:00
parent c98c4dc606
commit c644d0f789
3 changed files with 78 additions and 82 deletions

View file

@ -39,11 +39,11 @@ function buildRates () {
rates[cryptoCode] = {
cashIn: rate.ask.times(cashInCommission),
cashOut: rate.bid.div(cashOutCommission)
}
}
})
return rates
}
}
function buildBalances () {
var cryptoCodes = plugins.getcryptoCodes()
@ -55,7 +55,7 @@ function buildBalances () {
})
return _balances
}
}
function poll (req, res) {
var fingerprint = getFingerprint(req)
@ -103,9 +103,9 @@ function poll (req, res) {
res.json(response)
})
plugins.recordPing(session(req), req.query, function(err) {
if (err) console.error(err);
});
plugins.recordPing(session(req), req.query, function (err) {
if (err) console.error(err)
})
}
function trade (req, res) {
@ -119,8 +119,8 @@ function trade (req, res) {
})
}
function stateChange(req, res) {
plugins.stateChange(session(req), req.body, function(err) {
function stateChange (req, res) {
plugins.stateChange(session(req), req.body, function (err) {
if (err) console.error(err)
res.json(200)
})
@ -276,5 +276,5 @@ function session (req) {
function getFingerprint (req) {
return (typeof req.connection.getPeerCertificate === 'function' &&
req.connection.getPeerCertificate().fingerprint) || 'unknown'
req.connection.getPeerCertificate().fingerprint) || 'unknown'
}