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