mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
sort forum list
This commit is contained in:
parent
a22b397fc4
commit
7892df9b9f
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue