Use limit and offset directly, otherwise the amount is wrong
It will return less than 50 for some reason
This commit is contained in:
parent
456dbf9997
commit
0095a66198
1 changed files with 2 additions and 3 deletions
|
|
@ -343,8 +343,7 @@ defmodule Pleroma.Upload do
|
||||||
where:
|
where:
|
||||||
fragment("(?)->>'type' = ?", obj.data, "Document") and
|
fragment("(?)->>'type' = ?", obj.data, "Document") and
|
||||||
fragment("(?)->>'actor' = ?", obj.data, ^user.ap_id),
|
fragment("(?)->>'actor' = ?", obj.data, ^user.ap_id),
|
||||||
order_by: [desc: obj.id]
|
order_by: [desc: obj.id], limit: ^limit, offset: ^offset
|
||||||
)
|
) |> Repo.all()
|
||||||
|> Pagination.fetch_paginated(%{"offset" => offset, "limit" => limit}, :offset)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue