sort forum list

This commit is contained in:
byte[] 2019-11-27 21:59:38 -05:00
parent a22b397fc4
commit 7892df9b9f

View file

@ -18,6 +18,7 @@ defmodule PhilomenaWeb.ForumListPlug do
# fixme: add caching!
defp lookup_visible_forums(user) do
Forum
|> order_by(asc: :name)
|> Repo.all()
|> Enum.filter(&Can.can?(user, :show, &1))
end