- @spec destroy(FlakeId.t(), FlakeId.t()) :: {:ok, Bookmark.t()} | {:error, Changeset.t()}
+ def get(user_id, activity_id) do
+ Bookmark
+ |> where(user_id: ^user_id)
+ |> where(activity_id: ^activity_id)
+ |> Repo.one()
+ end
+
+ @spec destroy(FlakeId.Ecto.CompatType.t(), FlakeId.Ecto.CompatType.t()) ::
+ {:ok, Bookmark.t()} | {:error, Changeset.t()}