Do not add the "next" key to likes.json if there is no more items
This commit is contained in:
parent
9e7c633b39
commit
e8ad116c2a
3 changed files with 55 additions and 6 deletions
|
|
@ -66,8 +66,10 @@ defmodule Pleroma.Web.ActivityPub.ObjectView do
|
|||
"orderedItems" => items
|
||||
}
|
||||
|
||||
if offset < total do
|
||||
if offset + length(items) < total do
|
||||
Map.put(map, "next", "#{iri}?page=#{page + 1}")
|
||||
else
|
||||
map
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue