Correctly return 404s in /images endpoint

This commit is contained in:
Claudio Ortolina
2024-10-03 16:14:27 +01:00
parent 040859220b
commit e7fc335251
3 changed files with 62 additions and 4 deletions
+2 -2
View File
@@ -68,13 +68,13 @@ defmodule MusicLibrary.Records do
Repo.one!(q)
end
def get_cover!(id) do
def get_cover(id) do
q =
from r in Record,
where: r.id == ^id,
select: %{cover_data: r.cover_data, cover_hash: r.cover_hash}
Repo.one!(q)
Repo.one(q)
end
def search_release_group(query, opts \\ []) do