Include wishlist count in stats page

This commit is contained in:
Claudio Ortolina
2024-10-22 18:29:51 +01:00
parent 52a268851a
commit bb74057c31
5 changed files with 58 additions and 14 deletions
+8
View File
@@ -26,6 +26,14 @@ defmodule MusicLibrary.Wishlist do
Repo.aggregate(search, :count)
end
def count do
q =
from r in Record,
where: is_nil(r.purchased_at)
Repo.aggregate(q, :count)
end
defp build_search(query) do
{:ok, parsed_query} = SearchParser.parse(query)