Actually fix pagination with tombstoned items
This commit is contained in:
parent
28a35b8241
commit
bb0607b959
|
@ -30,7 +30,7 @@ defmodule FrenzyWeb.FeedController do
|
||||||
|
|
||||||
items =
|
items =
|
||||||
Item
|
Item
|
||||||
|> where([i], i.feed_id == ^id)
|
|> where([i], not i.tombstone and i.feed_id == ^id)
|
||||||
|> Paginator.paginate(params)
|
|> Paginator.paginate(params)
|
||||||
|> limit(50)
|
|> limit(50)
|
||||||
|> Repo.all()
|
|> Repo.all()
|
||||||
|
|
|
@ -103,7 +103,7 @@ defmodule FrenzyWeb.GroupController do
|
||||||
|
|
||||||
items =
|
items =
|
||||||
Item
|
Item
|
||||||
|> where([i], i.feed_id in ^feed_ids)
|
|> where([i], not i.tombstone and i.feed_id in ^feed_ids)
|
||||||
|> Paginator.paginate(params)
|
|> Paginator.paginate(params)
|
||||||
|> limit(50)
|
|> limit(50)
|
||||||
|> preload(:feed)
|
|> preload(:feed)
|
||||||
|
|
Loading…
Reference in New Issue