„lib/chiya_web/controllers/page_controller.ex“ ändern

This commit is contained in:
inhji 2023-07-07 11:05:50 +02:00
parent da838ba225
commit 0fde2fcd84

View file

@ -63,4 +63,19 @@ defmodule ChiyaWeb.PageController do
page_title: "About" page_title: "About"
) )
end end
def wiki(conn, _params) do
settings = conn.assigns.settings
channel =
case settings.wiki_channel_id do
nil -> nil
id -> Chiya.Channels.get_channel!(id) |> Chiya.Channels.preload_channel_public()
end
render(conn, :about,
channel: channel,
page_title: "Wiki"
)
end
end end