 
     send_resp(conn, :no_content, "")
   end
+
+  defp find(conn = %Plug.Conn{params: %{"id" => id}}, _opts) do
+    case Repo.get(Annotation, id) do
+      {:ok, annotation} ->
+        conn
+        |> assign(:Annotation, annotation)
+
+      _ ->
+        conn
+        |> put_status(:not_found)
+        |> render(Core.ErrorView, "404.json", %{})
+        |> halt()
+    end
+  end
 end

  use Core.Web, :controller
  alias Core.Annotation

  plug Guardian.Plug.EnsureAuthenticated, handler: Core.Auth
  plug Core.BodyParams, name: "annotation"

  def index(conn, _params) do
    annotations = Repo.all(Annotation)

    end
  end

  def delete(conn, %{"id" => _}) do
    annotation = conn.assigns[:annotation]

    # Here we use delete! (with a bang) because we expect
    # it to always work (and if it does not, it will raise).
