From bd9f88ab0276a9d31994e47a9a8b410a7e5c3042 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Sun, 9 Mar 2025 15:49:07 +0000 Subject: [PATCH] Don't pipe in one function only --- lib/music_library/collection.ex | 4 ++-- lib/music_library/wishlist.ex | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/music_library/collection.ex b/lib/music_library/collection.ex index 625fb87b..6b6dd3bc 100644 --- a/lib/music_library/collection.ex +++ b/lib/music_library/collection.ex @@ -68,7 +68,7 @@ defmodule MusicLibrary.Collection do where: fragment("records.purchased_at IS NOT NULL"), select: %{record_id: fragment("records.id"), release_id: r.value} - q |> Repo.all() + Repo.all(q) end def count_records_by_genre do @@ -78,7 +78,7 @@ defmodule MusicLibrary.Collection do order_by: [desc: count(r.value)], select: %{genre: r.value, count: count(r.value)} - q |> Repo.all() + Repo.all(q) end defp base_search do diff --git a/lib/music_library/wishlist.ex b/lib/music_library/wishlist.ex index 67b46521..38f4d275 100644 --- a/lib/music_library/wishlist.ex +++ b/lib/music_library/wishlist.ex @@ -28,7 +28,7 @@ defmodule MusicLibrary.Wishlist do where: fragment("records.purchased_at IS NULL"), select: %{record_id: fragment("records.id"), release_id: r.value} - q |> Repo.all() + Repo.all(q) end defp base_search do