ML-152: add /api/v1/ version prefix to all API routes

This commit is contained in:
Claudio Ortolina
2026-04-30 11:57:43 +01:00
parent 70d5f3bf61
commit c489fde1cc
6 changed files with 77 additions and 28 deletions
@@ -33,8 +33,8 @@ defmodule MusicLibraryWeb.CollectionJSON do
purchased_at: record.purchased_at,
artists: Enum.map(record.artists, & &1.name),
title: record.title,
cover_url: url(~p"/api/assets/#{Transform.new(hash: record.cover_hash)}"),
thumb_url: url(~p"/api/assets/#{Transform.new(hash: record.cover_hash, width: 480)}")
cover_url: url(~p"/api/v1/assets/#{Transform.new(hash: record.cover_hash)}"),
thumb_url: url(~p"/api/v1/assets/#{Transform.new(hash: record.cover_hash, width: 480)}")
}
end
end
+1 -1
View File
@@ -123,7 +123,7 @@ defmodule MusicLibraryWeb.Router do
end
end
scope "/api", MusicLibraryWeb do
scope "/api/v1", MusicLibraryWeb do
pipe_through :api
get "/collection/latest", CollectionController, :latest