   import Ecto.Query
 
   alias Guardian.Plug
-  alias Phoenix.Controller
   alias Tilex.{Channel, Notifications, Liking, Post, Posts}
 
   plug(:load_channels when action in [:new, :create, :edit, :update])

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

  def random(conn, _) do

  end

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