   end
 
   def show(%{assigns: %{slug: slug}} = conn, _) do
-    format = Controller.get_format(conn)
-
     post =
       Post
       |> Repo.get_by!(slug: slug)

    conn
    |> assign_post_canonical_url(post)
    |> assign(:twitter_shareable, true)
    |> render("show.#{format}", post: post)
  end

  def random(conn, _) do

  import Ecto.Query

  alias Guardian.Plug
  alias Tilex.{Channel, Notifications, Liking, Post, Posts}

  plug(:load_channels when action in [:new, :create, :edit, :update])
