From 245ab922be4644e8e5a3267ab1282f63911ea9e1 Mon Sep 17 00:00:00 2001 From: Jared Date: Tue, 27 Dec 2022 21:25:06 -0500 Subject: [PATCH] Increase limit for progressive loading --- endpoints/getrewardfund.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/endpoints/getrewardfund.go b/endpoints/getrewardfund.go index e0a211b..86bc320 100644 --- a/endpoints/getrewardfund.go +++ b/endpoints/getrewardfund.go @@ -41,7 +41,7 @@ func GetRewardFund(resp http.ResponseWriter, req *http.Request) { return } Db.Table("contributions").Select("distinct on (created_at::TIMESTAMP::DATE) created_at").Where("reward_fund_id = ?", fund.ID).Scan(&contribs.Dates) - baseQuery := Db.Table("contributions").Where("reward_fund_id = ?", fund.ID).Limit(12) // TODO: change value + baseQuery := Db.Table("contributions").Where("reward_fund_id = ?", fund.ID).Limit(30) baseCount := Db.Table("contributions").Where("reward_fund_id = ?", fund.ID) Db.Table("contributions").Select("sum(amount) amount_held").Where("reward_fund_id = ?", fund.ID).Scan(&amountHeld) @@ -101,7 +101,7 @@ func GetContributions(w http.ResponseWriter, r *http.Request) { } var resp GetContributionsResponse - baseQuery := Db.Table("contributions").Where("reward_fund_id = ?", req.Id).Offset(req.Offset).Limit(12) // TODO: change value + baseQuery := Db.Table("contributions").Where("reward_fund_id = ?", req.Id).Offset(req.Offset).Limit(30) baseCount := Db.Table("contributions").Where("reward_fund_id = ?", req.Id) Db.Table("contributions").Select("distinct on (created_at::TIMESTAMP::DATE) created_at").Where("reward_fund_id = ?", req.Id).Scan(&resp.Dates)