asciinema.org/web/controllers/asciicast_animation_controller.ex

13 lines
322 B
Elixir

defmodule Asciinema.AsciicastAnimationController do
use Asciinema.Web, :controller
alias Asciinema.{Repo, Asciicast}
def show(conn, %{"id" => id}) do
asciicast = Repo.one!(Asciicast.by_id_or_secret_token(id))
conn
|> put_layout("simple.html")
|> render("show.html", asciicast: asciicast)
end
end