|
|
@ -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(); |
|
|
|