ML-152: add /api/v1/ version prefix to all API routes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user