Browse Source

add params to express

activeAddress
Ivan Socolsky 10 years ago
parent
commit
6c76916edb
  1. 7
      lib/expressapp.js

7
lib/expressapp.js

@ -261,7 +261,12 @@ ExpressApp.start = function(opts) {
router.get('/v1/txhistory/', function(req, res) {
getServerWithAuth(req, res, function(server) {
server.getTxHistory({}, function(err, txs) {
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'];
server.getTxHistory(opts, function(err, txs) {
if (err) return returnError(err, res, req);
res.json(txs);
res.end();

Loading…
Cancel
Save