Rename /images to /covers

This commit is contained in:
Claudio Ortolina
2024-10-06 16:06:33 +01:00
parent 6913ee2d8d
commit ac27e86fb5
8 changed files with 17 additions and 17 deletions
@@ -1,4 +1,4 @@
defmodule MusicLibraryWeb.ImageController do
defmodule MusicLibraryWeb.CoverController do
use MusicLibraryWeb, :controller
alias MusicLibrary.Records
@@ -40,7 +40,7 @@
<dt>
<img
class="absolute max-w-12 rounded-lg shadow"
src={~p"/images/#{@latest_record.id}"}
src={~p"/covers/#{@latest_record.id}"}
alt={@latest_record.title}
/>
<p class="ml-16 truncate text-sm font-medium text-gray-500">Latest record</p>
@@ -28,7 +28,7 @@
<img
class="max-w-16 rounded-lg"
alt={record.title}
src={~p"/images/#{record.id}?vsn=#{record.cover_hash || ""}"}
src={~p"/covers/#{record.id}?vsn=#{record.cover_hash || ""}"}
/>
<span class="absolute right-1 bottom-0 block text-white drop-shadow-md">
<%= Records.Record.format_short_label(record.format) %>
@@ -15,7 +15,7 @@
<span class="relative block md:inline-block drop-shadow">
<img
class="w-full"
src={~p"/images/#{@record.id}?vsn=#{@record.cover_hash || ""}"}
src={~p"/covers/#{@record.id}?vsn=#{@record.cover_hash || ""}"}
alt={@record.title}
/>
<span class="absolute right-2 bottom-1 block text-white drop-shadow-md">
+1 -1
View File
@@ -18,7 +18,7 @@ defmodule MusicLibraryWeb.Router do
pipe_through :browser
get "/health", HealthController, :index
get "/images/:record_id", ImageController, :show
get "/covers/:record_id", CoverController, :show
get "/", StatsController, :index
live "/records", RecordLive.Index, :index