0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-25 23:04:45 +01:00

Fix list_options GetStartEnd (#16303)

end is start + pageSize and not start + page
This commit is contained in:
sebastian-sauer 2021-06-29 23:42:23 +02:00 committed by GitHub
parent dea7a5c5b9
commit e8c6cead0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,7 +41,7 @@ func (opts *ListOptions) setEnginePagination(e Engine) Engine {
func (opts *ListOptions) GetStartEnd() (start, end int) {
opts.setDefaultValues()
start = (opts.Page - 1) * opts.PageSize
end = start + opts.Page
end = start + opts.PageSize
return
}