clacks/lib/clacks_web/plug/format.ex

11 lines
203 B
Elixir
Raw Normal View History

2019-10-06 23:41:18 +00:00
defmodule ClacksWeb.Plug.Format do
import Plug.Conn
def init(opts), do: opts
def call(conn, _opts) do
format = Phoenix.Controller.get_format(conn)
assign(conn, :format, format)
end
end