0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-24 00:03:11 -05:00
forgejo/routers/api/v1/user
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
..
app.go Remove page size limit comment from swagger (#11806) 2020-06-09 00:57:38 -04:00
email.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
follower.go Remove page size limit comment from swagger (#11806) 2020-06-09 00:57:38 -04:00
gpg_key.go Remove page size limit comment from swagger (#11806) 2020-06-09 00:57:38 -04:00
key.go Remove page size limit comment from swagger (#11806) 2020-06-09 00:57:38 -04:00
repo.go Rework api/user/repos for pagination (#11827) 2020-06-13 12:35:59 +01:00
star.go Remove page size limit comment from swagger (#11806) 2020-06-09 00:57:38 -04:00
user.go Remove page size limit comment from swagger (#11806) 2020-06-09 00:57:38 -04:00
watch.go Remove page size limit comment from swagger (#11806) 2020-06-09 00:57:38 -04:00