Browse Source

Merge pull request #644 from carlosfaria94/master

Replace ServerWithAuth by Server in getFiatRate
feat/estimateFee-limit
Ivan Socolsky 8 years ago
committed by GitHub
parent
commit
98165ab5a7
  1. 24
      lib/expressapp.js

24
lib/expressapp.js

@ -660,16 +660,20 @@ ExpressApp.prototype.start = function(opts, cb) {
}); });
router.get('/v1/fiatrates/:code/', function(req, res) { router.get('/v1/fiatrates/:code/', function(req, res) {
getServerWithAuth(req, res, function(server) { var server;
var opts = { var opts = {
code: req.params['code'], code: req.params['code'],
source: req.query.source, provider: req.query.provider,
ts: +req.query.ts, ts: +req.query.ts,
}; };
server.getFiatRate(opts, function(err, rates) { try {
if (err) return returnError(err, res, req); server = getServer(req, res);
res.json(rates); } catch (ex) {
}); return returnError(ex, res, req);
}
server.getFiatRate(opts, function(err, rates) {
if (err) return returnError(err, res, req);
res.json(rates);
}); });
}); });

Loading…
Cancel
Save