add channel action in page controller
This commit is contained in:
parent
188f12112e
commit
0cf474ec97
1 changed files with 5 additions and 0 deletions
|
@ -7,4 +7,9 @@ defmodule ChiyaWeb.PageController do
|
||||||
settings = Chiya.Site.get_settings()
|
settings = Chiya.Site.get_settings()
|
||||||
render(conn, :home, layout: false, settings: settings)
|
render(conn, :home, layout: false, settings: settings)
|
||||||
end
|
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
|
end
|
||||||
|
|
Loading…
Reference in a new issue