Main list orders by the main artist

This commit is contained in:
Claudio Ortolina
2024-09-15 20:59:30 +01:00
parent 90e8022a77
commit 4d17790cbe
+6 -3
View File
@@ -18,9 +18,12 @@ defmodule MusicLibrary.Records do
"""
def list_records do
Record
|> limit(10)
|> Repo.all()
q =
from r in Record,
order_by: r.artists[0]["sort_name"],
limit: 50
Repo.all(q)
end
@doc """