Merge pull request #325 from shocknet/fix/recent-txs
reverse and filter
This commit is contained in:
commit
a0d5824696
1 changed files with 3 additions and 3 deletions
|
|
@ -1273,17 +1273,17 @@ module.exports = async (
|
|||
|
||||
res.json({
|
||||
transactions: getListPage({
|
||||
entries: transactions,
|
||||
entries: transactions.reverse(),
|
||||
itemsPerPage,
|
||||
page
|
||||
}),
|
||||
payments: getListPage({
|
||||
entries: payments,
|
||||
entries: payments.reverse(),
|
||||
itemsPerPage,
|
||||
page
|
||||
}),
|
||||
invoices: {
|
||||
content: invoices,
|
||||
content: invoices.filter(invoice => invoice.settled),
|
||||
page,
|
||||
totalPages: Math.ceil(last_index_offset / itemsPerPage),
|
||||
totalItems: last_index_offset
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue