1
1
mirror of https://github.com/go-gitea/gitea synced 2024-09-27 14:54:05 +00:00
gitea/routers/api/v1
Cirno the Strongest fdc6287973
Rework api/user/repos for pagination (#11827) (#11877)
* Add count to `GetUserRepositories` so that pagination can be supported for `/user/{username}/repos`
* Rework ListMyRepos to use models.SearchRepository

ListMyRepos was an odd one. It first fetched all user repositories and then tried to supplement them with accessible map. The end result was that:

* Limit for pagination did not work because accessible repos would always be appended
* The amount of pages was incorrect if one were to calculate it
* When paginating, all accessible repos would be shown on every page

Hopefully it should now work properly. Fixes #11800 and does not require any change on Drone-side as it can properly interpret and act on Link header which we now set.

Co-authored-by: Lauris BH <lauris@nix.lv>
(cherry picked from commit 0159851cc3)
2020-06-13 18:35:13 +01:00
..
admin Various fixes in login sources (#10428) 2020-02-23 13:52:05 -06:00
misc Allow different HardBreaks settings for documents and comments (#11515) (#11599) 2020-05-24 11:45:56 +01:00
notify [Api] Check Notify (always return json) (#10059) 2020-04-10 19:49:39 -04:00
org Add Organization Wide Labels (#10814) 2020-04-01 01:14:46 -03:00
repo Honor DEFAULT_PAGING_NUM for API (#11805) (#11813) 2020-06-09 16:05:21 +03:00
swagger API: Add pull review endpoints (#11224) 2020-05-02 03:20:51 +03:00
user Rework api/user/repos for pagination (#11827) (#11877) 2020-06-13 18:35:13 +01:00
utils Granular webhook events (#9626) 2020-03-06 07:10:48 +02:00
api.go Correctly set the organization num repos (#11339) 2020-05-12 01:04:08 +03:00