open-pod/lib/podcast_feed_web/controllers/feed_controller.ex

18 lines
563 B
Elixir
Raw Normal View History

2020-05-22 22:04:15 +02:00
defmodule PodcastFeedWeb.FeedController do
use PodcastFeedWeb, :controller
def apeMilano(conn, _params) do
%{podcast: podcast, items: items} = PodcastFeed.archive("incontri-a-piano-terra")
2020-05-22 22:04:15 +02:00
conn
|> put_resp_content_type("text/xml")
|> render("feed.xml", podcast: podcast, items: items)
2020-05-22 22:04:15 +02:00
end
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
2020-05-22 22:04:15 +02:00
end