mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
Do not try to guess which pagination we need by the existence of an :offset param.
Require explicit request to get offset pagination.
This commit is contained in:
parent
afe9c152ab
commit
83f27282ba
2 changed files with 3 additions and 6 deletions
|
@ -603,11 +603,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
||||||
|> Map.put(:muting_user, reading_user)
|
|> Map.put(:muting_user, reading_user)
|
||||||
end
|
end
|
||||||
|
|
||||||
pagination_type =
|
pagination_type = Map.get(params, :pagination_type) || :keyset
|
||||||
cond do
|
|
||||||
!Map.has_key?(params, :offset) -> :keyset
|
|
||||||
true -> :offset
|
|
||||||
end
|
|
||||||
|
|
||||||
%{
|
%{
|
||||||
godmode: params[:godmode],
|
godmode: params[:godmode],
|
||||||
|
|
|
@ -110,7 +110,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do
|
||||||
limit: page_size,
|
limit: page_size,
|
||||||
offset: (page - 1) * page_size,
|
offset: (page - 1) * page_size,
|
||||||
godmode: godmode,
|
godmode: godmode,
|
||||||
exclude_reblogs: not with_reblogs
|
exclude_reblogs: not with_reblogs,
|
||||||
|
pagination_type: :offset
|
||||||
})
|
})
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|
|
Loading…
Reference in a new issue