fix: list recent payments/refunds (#317)

This commit is contained in:
Sangamesh Kulkarni
2023-01-09 14:02:21 +05:30
committed by GitHub
parent 68f92797db
commit 4bc0495d3f
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ impl PaymentIntentDbExt for PaymentIntent {
// when https://github.com/rust-lang/rust/issues/52662 becomes stable
let mut filter = <Self as HasTable>::table()
.filter(dsl::merchant_id.eq(merchant_id.to_owned()))
.order_by(dsl::id)
.order(dsl::modified_at.desc())
.into_boxed();
if let Some(customer_id) = customer_id {

View File

@ -32,7 +32,7 @@ impl RefundDbExt for Refund {
) -> CustomResult<Vec<Self>, errors::DatabaseError> {
let mut filter = <Self as HasTable>::table()
.filter(dsl::merchant_id.eq(merchant_id.to_owned()))
.order_by(dsl::id)
.order(dsl::modified_at.desc())
.into_boxed();
match &refund_list_details.payment_id {