Add /api/collection/on_this_day endpoint

This commit is contained in:
Claudio Ortolina
2025-10-24 20:06:23 +01:00
parent 09f1b2e71a
commit f02564fa30
4 changed files with 51 additions and 1 deletions
@@ -16,6 +16,12 @@ defmodule MusicLibraryWeb.CollectionJSON do
}
end
def on_this_day(%{records: records}) do
%{
records: Enum.map(records, &record/1)
}
end
defp record(record) do
%{
id: record.id,