%{
"id" => featured_address,
"type" => "OrderedCollection",
- "orderedItems" => objects
+ "orderedItems" => objects,
+ "totalItems" => length(objects)
}
|> Map.merge(Utils.make_json_ld_header())
end
%{nickname: nickname, featured_address: featured_address, pinned_objects: pinned_objects} =
refresh_record(user)
- %{"id" => ^featured_address, "orderedItems" => items} =
+ %{"id" => ^featured_address, "orderedItems" => items, "totalItems" => 2} =
conn
|> get("/users/#{nickname}/collections/featured")
|> json_response(200)