add channel action in page controller

This commit is contained in:
inhji 2023-03-09 14:43:31 +01:00
parent 188f12112e
commit 0cf474ec97

View file

@ -7,4 +7,9 @@ defmodule ChiyaWeb.PageController do
settings = Chiya.Site.get_settings()
render(conn, :home, layout: false, settings: settings)
end
def channel(conn, %{"slug" => channel_slug}) do
channel = Chiya.Channels.get_channel_by_slug_preloaded!(channel_slug)
render(conn, :channel, layout: false, channel: channel)
end
end