mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 15:10:43 +02:00
Fix panic in team repos API (#19431)
* Fix panic in team repos API * Fix pagination * fmt
This commit is contained in:
1 parent
409ff55a29
commit
ae6a52440a
3 files changed
+3
-2
No files matched your search
@@ -48,7 +48,7 @@ func GetTeamRepositories(ctx context.Context, opts *SearchTeamRepoOptions) ([]*r
|
||||
)
|
||||
}
|
||||
if opts.PageSize > 0 {
|
||||
sess.Limit(opts.PageSize, opts.Page*opts.PageSize)
|
||||
sess.Limit(opts.PageSize, (opts.Page-1)*opts.PageSize)
|
||||
}
|
||||
var repos []*repo_model.Repository
|
||||
return repos, sess.OrderBy("repository.name").
|
||||
|
||||
Reference in new issue
Block a user