   @doc """
   Displays the given tweak.
   """
-  @spec show(Plug.Conn.t(), Map.t(), current_user) :: Plug.Conn.t()
-  def show(conn, params, current_user)
+  @spec show(Plug.Conn.t(), Map.t()) :: Plug.Conn.t()
+  def show(conn, params)
 
-  def show(conn, %{"id" => id}, current_user) do
+  def show(conn, %{"id" => id}) do
+    current_user = conn.assigns.current_user
+
     tweak =
       Tweak
       |> Repo.get(id)


  **Not implemented.**
  """
  @spec delete(Plug.Conn.t(), Map.t(), current_user) :: Plug.Conn.t()
  def delete(conn, _params, _current_user) do
    conn
  end

  @doc """
  Displays the edit tweak form.
  """
  @spec edit(Plug.Conn.t(), Map.t(), current_user) :: Plug.Conn.t()
  def edit(conn, params, current_user)

  def edit(conn, _, :guest), do: raise(NotLoggedInError, conn: conn)

  def edit(conn, %{"id" => id}, current_user) do
    tweak =
      Tweak
      |> Repo.get(id)

defmodule AtomTweaksWeb.TweakController do
  use AtomTweaksWeb, :controller

  alias AtomTweaks.Tweaks
  alias AtomTweaks.Tweaks.Tweak
  alias AtomTweaksWeb.NotLoggedInError
