소스 검색

Increase limit for progressive loading

master
Jared 2 년 전
부모
커밋
245ab922be
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      endpoints/getrewardfund.go

+ 2
- 2
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)


불러오는 중...
취소
저장