philomena/lib/philomena_web/controllers/api/rss/watched_controller.ex

14 lines
385 B
Elixir
Raw Permalink Normal View History

2019-12-04 01:50:23 +01:00
defmodule PhilomenaWeb.Api.Rss.WatchedController do
2019-12-01 00:11:24 +01:00
use PhilomenaWeb, :controller
alias PhilomenaWeb.ImageLoader
2019-12-01 00:11:24 +01:00
def index(conn, _params) do
{:ok, {images, _tags}} = ImageLoader.search_string(conn, "my:watched")
2019-12-01 00:11:24 +01:00
# NB: this is RSS, but using the RSS format causes Phoenix not to
# escape HTML
render(conn, "index.html", layout: false, images: images)
2019-12-01 00:11:24 +01:00
end
end