     |> render("show.json", annotation: annotation)
   end
 
-  def update(conn, %{"id" => _, "annotation" => annotation_params}) do
+  def update(conn, annotation_params) do
     annotation = conn.assigns[:annotation]
     changeset = Annotation.changeset(annotation, annotation_params)
 

  plug :find when action in [:update, :delete, :show]
  plug Core.Auth, %{key: :annotation,
                    type: "annotations"} when action in [:create, :update, :delete]
  plug Core.BodyParams, name: "annotation"

  def index(conn, _params) do
    annotations = Repo.all(Annotation)
    render(conn, "index.json", annotations: annotations)
  end

  def create(conn, %{"annotation" => annotation_params}) do
    user = Guardian.Plug.current_resource(conn)
    changeset = user
    |> build_assoc(:annotations)

    send_resp(conn, :no_content, "")
  end

  # Finds an annotation with "id"=`id`
  #
  # Assigns that annotation to the `conn` object
  defp find(conn = %Plug.Conn{params: %{"id" => id}}, _opts) do
    case Repo.get(Annotation, id) do
      nil ->
