Add paging to the `GetBannedPersons` fetch.
Currently GetBannedPersons fetches all banned users. It would be more performant if paging were added to this endpoint.
Not a huge deal, since this is only available to admins anyway.
See https://github.com/LemmyNet/lemmy/pull/4580 for an example how to implement this.
Also, we'd like to convert every existing page and limit to cursor pagination, like list_posts . But I'd need @dullbananas expertise on how to do that correctly.
When doing this I would change the endpoint to /api/v4/person/list with parameter banned_only. It only requires slightly more work, fulfills the same purpose and can later be extended with more optional parameters.
Hrm. So far the only two person fetches are listing admins, and listing banned persons, and only banned_persons is its own endpoint. Search can also list persons, but it already has pagination.
I think this is one case where I'd prefer specific endpoints, rather than a multi-purpose generic one, because we only have one case of person fetching, and /admin/banned is pretty clear.
I will make person_view.rs a bit more generic tho now, by adding a PersonQuery, with admin_only, banned_only, and pagination.
I dont see any reason why banned users should be a separate endpoint, its better to do like GetPosts with various filters (banned_only, local_only etc). This has been frequently requested (eg https://github.com/LemmyNet/lemmy/issues/4419) and would be very useful for small instances. Other frontends could already implement a full user list display with that basic endpoint, and later it could be extended with more filters and sort options. Afaik lemmy-ui only shows the banned users list under /admin which would work just as well with a general user list and banned_only filter.
Alright, as long as its under the admin heading, that'll probably be fine.