Browse Source

parse querystring params as numbers

activeAddress
Ivan Socolsky 10 years ago
parent
commit
95498f5b8b
  1. 6
      lib/expressapp.js

6
lib/expressapp.js

@ -262,9 +262,9 @@ ExpressApp.start = function(opts) {
router.get('/v1/txhistory/', function(req, res) {
getServerWithAuth(req, res, function(server) {
var opts = {};
if (req.param['minTs']) opts.minTs = req.params['minTs'];
if (req.param['maxTs']) opts.maxTs = req.params['maxTs'];
if (req.param['limit']) opts.limit = req.params['limit'];
if (req.query.minTs) opts.minTs = +req.query.minTs;
if (req.query.maxTs) opts.maxTs = +req.query.maxTs;
if (req.query.limit) opts.limit = +req.query.limit;
server.getTxHistory(opts, function(err, txs) {
if (err) return returnError(err, res, req);

Loading…
Cancel
Save