You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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)
5 years ago
..
app.go Refactor UpdateOAuth2Application (#11034) 5 years ago
email.go Swagger info corrections (#9441) 5 years ago
follower.go API add/generalize pagination (#9452) 5 years ago
gpg_key.go Handle expected errors in AddGPGkey API (#11644) (#11661) 5 years ago
key.go API add/generalize pagination (#9452) 5 years ago
repo.go Rework api/user/repos for pagination (#11827) (#11877) 5 years ago
star.go API add/generalize pagination (#9452) 5 years ago
user.go API add/generalize pagination (#9452) 5 years ago
watch.go Add issue subscription check to API (#10967) 5 years ago