diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2021-09-14 19:48:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-14 18:48:27 +0100 |
commit | 87505a9464a2c2c9d16547e06b0c922518dea73c (patch) | |
tree | b04d85857b76d506cadc6abe79f62180a78ff1d9 /models/star.go | |
parent | 0a542dd59f8061797976f33690bf10357aa0b0ad (diff) | |
download | gitea-87505a9464a2c2c9d16547e06b0c922518dea73c.tar.gz gitea-87505a9464a2c2c9d16547e06b0c922518dea73c.zip |
Add `AbsoluteListOptions` (#17028)
This PR adds a `ListOptions` type which is not paged but uses absolute values. It is implemented as discussed in Discord.
Extracted from #16510 to clean that PR.
Diffstat (limited to 'models/star.go')
-rw-r--r-- | models/star.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/star.go b/models/star.go index 2d9496caf5..f71d39ce2c 100644 --- a/models/star.go +++ b/models/star.go @@ -73,7 +73,7 @@ func (repo *Repository) GetStargazers(opts ListOptions) ([]*User, error) { sess := x.Where("star.repo_id = ?", repo.ID). Join("LEFT", "star", "`user`.id = star.uid") if opts.Page > 0 { - sess = opts.setSessionPagination(sess) + sess = setSessionPagination(sess, &opts) users := make([]*User, 0, opts.PageSize) return users, sess.Find(&users) |