1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-05 09:44:26 +00:00
gitea/routers/api/v1/user
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
..
app.go Refactor UpdateOAuth2Application (#11034) 2020-04-30 18:50:47 +01:00
email.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
follower.go API add/generalize pagination (#9452) 2020-01-24 14:00:29 -05:00
gpg_key.go Handle expected errors in AddGPGkey API (#11644) (#11661) 2020-05-28 18:16:41 -04:00
key.go API add/generalize pagination (#9452) 2020-01-24 14:00:29 -05:00
repo.go Rework api/user/repos for pagination (#11827) (#11877) 2020-06-13 18:35:13 +01:00
star.go API add/generalize pagination (#9452) 2020-01-24 14:00:29 -05:00
user.go API add/generalize pagination (#9452) 2020-01-24 14:00:29 -05:00
watch.go Add issue subscription check to API (#10967) 2020-04-21 14:48:53 +01:00