open-pod/lib/podcast_feed_web/controllers/feed_controller.ex
2020-05-25 09:06:13 +00:00

10 lines
328 B
Elixir

defmodule PodcastFeedWeb.FeedController do
use PodcastFeedWeb, :controller
def by_identifier(conn, %{"identifier" => identifier}) do
%{podcast: podcast, items: items} = PodcastFeed.archive(identifier)
conn
|> put_resp_content_type("text/xml")
|> render("feed.xml", podcast: podcast, items: items)
end
end