diff --git a/db/db.go b/db/db.go index 1f6c50d0e..bfa82960a 100644 --- a/db/db.go +++ b/db/db.go @@ -1814,7 +1814,7 @@ func (db database) GetPaymentHistory(org_uuid string, r *http.Request) []Payment limitQuery = fmt.Sprintf("LIMIT %d OFFSET %d", limit, offset) - query := `SELECT * FROM payment_histories WHERE org_uuid = '` + org_uuid + `' ORDER BY created DESC` + query := `SELECT * FROM payment_histories WHERE org_uuid = '` + org_uuid + `' AND status = true ORDER BY created DESC` db.db.Raw(query + " " + limitQuery).Find(&payment) return payment diff --git a/utils/utils.go b/utils/utils.go index 629b683bc..95f41417a 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -28,7 +28,7 @@ func GetPaginationParams(r *http.Request) (int, int, string, string, string) { intPage = 1 } if intLimit == 0 { - intLimit = -1 + intLimit = 1 } if sortBy == "" { sortBy = "created"