getlasttxs api no longer allows query string parameters

This commit is contained in:
joeuhren
2020-12-18 14:55:30 -07:00
parent 7a1f4a23d5
commit becdeab02d
6 changed files with 50 additions and 17 deletions
+2 -11
View File
@@ -395,17 +395,8 @@ module.exports = {
});
},
get_last_txs: function(req, cb) {
if (typeof req.query.length === 'undefined' || isNaN(req.query.length) || req.query.length > settings.index.last_txs)
req.query.length = settings.index.last_txs;
if (typeof req.query.start === 'undefined' || isNaN(req.query.start) || req.query.start < 0)
req.query.start = 0;
if (typeof req.params.min === 'undefined' || isNaN(req.params.min ) || req.params.min < 0)
req.params.min = 0;
else
req.params.min = (req.params.min * 100000000);
this.get_last_txs_ajax(req.query.start, req.query.length, req.params.min,function(txs, count) {
get_last_txs: function(start, length, min, cb) {
this.get_last_txs_ajax(start, length, min, function(txs, count) {
var data = [];
for(i=0; i<txs.length; i++) {
var row = [];