reverse and filter
This commit is contained in:
parent
d8102a3377
commit
02e8f0e0ac
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