Return 404 for artist image requests without image data
This commit is contained in:
@@ -126,7 +126,7 @@ defmodule MusicLibrary.Artists do
|
|||||||
def get_image(artist_id) do
|
def get_image(artist_id) do
|
||||||
q =
|
q =
|
||||||
from ai in ArtistInfo,
|
from ai in ArtistInfo,
|
||||||
where: ai.id == ^artist_id,
|
where: ai.id == ^artist_id and not is_nil(ai.image_data),
|
||||||
select: %{
|
select: %{
|
||||||
image_data: ai.image_data,
|
image_data: ai.image_data,
|
||||||
image_data_width: ai.image_data_width,
|
image_data_width: ai.image_data_width,
|
||||||
|
|||||||
Reference in New Issue
Block a user