summaryrefslogtreecommitdiffstats
path: root/models/issue_reaction.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2021-09-14 19:48:27 +0200
committerGitHub <noreply@github.com>2021-09-14 18:48:27 +0100
commit87505a9464a2c2c9d16547e06b0c922518dea73c (patch)
treeb04d85857b76d506cadc6abe79f62180a78ff1d9 /models/issue_reaction.go
parent0a542dd59f8061797976f33690bf10357aa0b0ad (diff)
downloadgitea-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/issue_reaction.go')
-rw-r--r--models/issue_reaction.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/issue_reaction.go b/models/issue_reaction.go
index 80fae1ca5f..5721d8cc1f 100644
--- a/models/issue_reaction.go
+++ b/models/issue_reaction.go
@@ -87,7 +87,7 @@ func findReactions(e Engine, opts FindReactionsOptions) ([]*Reaction, error) {
In("reaction.`type`", setting.UI.Reactions).
Asc("reaction.issue_id", "reaction.comment_id", "reaction.created_unix", "reaction.id")
if opts.Page != 0 {
- e = opts.setEnginePagination(e)
+ e = setEnginePagination(e, &opts)
reactions := make([]*Reaction, 0, opts.PageSize)
return reactions, e.Find(&reactions)