Serverside Pagination for payments (#1613)
* initial backend support * implement payments pagination on frontend * implement search for payments api * fix pyright issues * sqlite support for searching * backwards compatability * formatting, small fixes * small optimization * fix sorting issue, add error handling * GET payments test * filter by dates, use List instead of list * fix sqlite * update bundle * test old payments endpoint aswell * refactor for easier review * optimise test * revert unnecessary change --------- Co-authored-by: dni ⚡ <office@dnilabs.com>
This commit is contained in:
@@ -67,8 +67,13 @@ window.LNbits = {
|
||||
getWallet: function (wallet) {
|
||||
return this.request('get', '/api/v1/wallet', wallet.inkey)
|
||||
},
|
||||
getPayments: function (wallet) {
|
||||
return this.request('get', '/api/v1/payments', wallet.inkey)
|
||||
getPayments: function (wallet, query) {
|
||||
const params = new URLSearchParams(query)
|
||||
return this.request(
|
||||
'get',
|
||||
'/api/v1/payments/paginated?' + params,
|
||||
wallet.inkey
|
||||
)
|
||||
},
|
||||
getPayment: function (wallet, paymentHash) {
|
||||
return this.request(
|
||||
@@ -185,7 +190,7 @@ window.LNbits = {
|
||||
},
|
||||
payment: function (data) {
|
||||
obj = {
|
||||
checking_id: data.id,
|
||||
checking_id: data.checking_id,
|
||||
pending: data.pending,
|
||||
amount: data.amount,
|
||||
fee: data.fee,
|
||||
|
||||
Reference in New Issue
Block a user