1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-10 17:54:27 +00:00
Cirno the Strongest 0159851cc3
Rework api/user/repos for pagination (#11827)
* 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>
2020-06-13 12:35:59 +01:00
..
2020-03-22 11:12:55 -04:00
2020-04-05 07:20:50 +01:00
2020-06-05 16:01:53 -04:00
2020-02-27 20:10:27 -03:00
2017-05-04 13:54:56 +08:00
2020-04-05 07:20:50 +01:00
2019-12-15 16:57:34 -05:00
2020-04-05 07:20:50 +01:00
2020-03-22 11:12:55 -04:00
2020-04-05 07:20:50 +01:00
2020-04-14 09:53:34 -04:00
2020-03-22 11:12:55 -04:00
2020-01-24 14:00:29 -05:00
2020-04-05 07:20:50 +01:00
2020-03-22 11:12:55 -04:00
2020-03-02 00:05:44 +02:00
2019-08-23 12:40:29 -04:00
2020-04-05 07:20:50 +01:00
2020-01-13 18:33:46 +01:00
2019-06-12 15:41:28 -04:00
2018-10-20 18:19:21 -04:00
2020-03-28 15:09:55 +02:00